Bug 1234729 - Add telemetry probe for when we load a page from cache r=sebastian p=margaret
--- 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;