Bug 1497904 - Pressing enter in an empty address bar should not increment the selected result method histogram. r=adw
authorMark Banner <standard8@mozilla.com>
Wed, 10 Oct 2018 21:59:55 +0000
changeset 496418 6c4930dac581c9d9acc581d66047d3a0d520e965
parent 496417 ddcd7cc2f3cdd88f5f399f4c59d530aceda0d722
child 496419 42bd6d4455a4771a4f8ccc036a702816ab81e803
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1497904
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1497904 - Pressing enter in an empty address bar should not increment the selected result method histogram. r=adw Since we don't take any action in this case, we shouldn't be logging telemetry for it. Differential Revision: https://phabricator.services.mozilla.com/D8235
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -665,26 +665,26 @@ file, You can obtain one at http://mozil
           }
 
           // Do the command of the selected one-off if it's not an engine.
           if (selectedOneOff && !selectedOneOff.engine) {
             selectedOneOff.doCommand();
             return;
           }
 
-          BrowserUsageTelemetry.recordUrlbarSelectedResultMethod(
-            event, this.userSelectionBehavior);
-
           let where = openUILinkWhere || this._whereToOpen(event);
 
           let url = this.value;
           if (!url) {
             return;
           }
 
+          BrowserUsageTelemetry.recordUrlbarSelectedResultMethod(
+            event, this.userSelectionBehavior);
+
           let mayInheritPrincipal = false;
           let postData = null;
           let browser = gBrowser.selectedBrowser;
           let action = this._parseActionUrl(url);
 
           if (selectedOneOff && selectedOneOff.engine) {
             // If there's a selected one-off button then load a search using
             // the one-off's engine.