Bug 1234729 - Add telemetry probe for when we load a page from cache r=sebastian p=margaret
authorMark Finkle <mfinkle@mozilla.com>
Wed, 23 Dec 2015 11:59:11 -0500
changeset 277459 869deb5491192921298b0a1edc0ab3fc17502648
parent 277458 30b9e8aa695d29d815baa2b1f8c05ff2fa10df6a
child 277460 14aea198d5b18b4850801a23c61cbd066bf93f4f
push id16771
push usermfinkle@mozilla.com
push dateWed, 23 Dec 2015 16:59:25 +0000
treeherderfx-team@869deb549119 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1234729
milestone46.0a1
Bug 1234729 - Add telemetry probe for when we load a page from cache r=sebastian p=margaret
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -7496,16 +7496,17 @@ var Tabs = {
         // Notify if we are loading a page from cache.
         if (this._useCache) {
           let targetDoc = aEvent.originalTarget;
           let isTopLevel = (targetDoc.defaultView.parent === targetDoc.defaultView);
 
           // Ignore any about: pages, especially about:neterror since it means we failed to find the page in cache.
           let targetURI = targetDoc.documentURI;
           if (isTopLevel && !targetURI.startsWith("about:")) {
+            UITelemetry.addEvent("neterror.1", "toast", null, "usecache");
             Snackbars.show(Strings.browser.GetStringFromName("networkOffline.message"), Snackbars.LENGTH_INDEFINITE);
           }
         }
         break;
       case "TabOpen":
         // Use opening a new tab as a trigger to expire the most stale tab.
         this.expireLruTab();
         break;