Commit f165b1e3 authored by Sean Harrison's avatar Sean Harrison Committed by Commit Bot

Settings WebUI: Record all incorrect paths as hitting the main page

Bug: 869847
Change-Id: I825c179158f7fb560dc8c49e6af7cf160e5daa34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848382Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Sean Harrison <harrisonsean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704318}
parent 59918721
...@@ -753,9 +753,12 @@ cr.define('settings', function() { ...@@ -753,9 +753,12 @@ cr.define('settings', function() {
this.initializeRouteFromUrlCalled_ = true; this.initializeRouteFromUrlCalled_ = true;
const route = this.getRouteForPath(window.location.pathname); const route = this.getRouteForPath(window.location.pathname);
if (route) {
this.recordMetrics(window.location.pathname); // Record all correct paths entered on the settings page, and
} // as all incorrect paths are routed to the main settings page,
// record all incorrect paths as hitting the main settings page.
this.recordMetrics(route ? route.path : this.routes_.BASIC.path);
// Never allow direct navigation to ADVANCED. // Never allow direct navigation to ADVANCED.
if (route && route != this.routes_.ADVANCED) { if (route && route != this.routes_.ADVANCED) {
this.currentRoute = route; this.currentRoute = route;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment