Bug 1504686 - Don't count search for same document changes. r=Standard8, a=jcristau
authorMichael Kaply <mozilla@kaply.com>
Fri, 09 Nov 2018 11:24:59 +0000
changeset 501282 ceba8351e044c15a408e8302d41bafc21e70e528
parent 501281 be6c9c1f12a731ab06f4236848354e8190bb252e
child 501283 f6a1e485be9a28e08d4eb1b22140a900d1676e8b
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, jcristau
bugs1504686
milestone64.0
Bug 1504686 - Don't count search for same document changes. r=Standard8, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D11394
browser/modules/BrowserUsageTelemetry.jsm
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -199,18 +199,18 @@ let URICountListener = {
     // probe.
     if (shouldCountURI) {
       Services.telemetry.scalarAdd(UNFILTERED_URI_COUNT_SCALAR_NAME, 1);
     }
 
     if (!this.isHttpURI(uri)) {
       return;
     }
-
-    if (shouldRecordSearchCount(browser.getTabBrowser())) {
+    if (shouldRecordSearchCount(browser.getTabBrowser()) &&
+        !(flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)) {
       Services.search.recordSearchURLTelemetry(uriSpec);
     }
 
     if (!shouldCountURI) {
       return;
     }
 
     // Update the URI counts.