Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1401)

Unified Diff: chrome/browser/prerender/prerender_histograms.cc

Issue 1854643002: Implement PrerenderManager::AddPrerenderForOffline() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes PrerenderAllowedForOfflineAndForcedCellular Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_histograms.cc
diff --git a/chrome/browser/prerender/prerender_histograms.cc b/chrome/browser/prerender/prerender_histograms.cc
index 6e46198b70abc42630c98e6a9b5bfa2a5f0a2118..30d9f03731e86b394ce9e4b221873884b51d397e 100644
--- a/chrome/browser/prerender/prerender_histograms.cc
+++ b/chrome/browser/prerender/prerender_histograms.cc
@@ -47,7 +47,7 @@ std::string GetHistogramName(Origin origin, bool is_wash,
case ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN:
return ComposeHistogramName("webcross", name);
case ORIGIN_EXTERNAL_REQUEST:
- return ComposeHistogramName("externalrequest", name);
+ return ComposeHistogramName("externalrequest", name);
case ORIGIN_INSTANT:
return ComposeHistogramName("Instant", name);
case ORIGIN_LINK_REL_NEXT:
@@ -56,6 +56,8 @@ std::string GetHistogramName(Origin origin, bool is_wash,
return ComposeHistogramName("gws", name);
case ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR:
return ComposeHistogramName("externalrequestforced", name);
+ case ORIGIN_OFFLINE:
+ return ComposeHistogramName("offline", name);
default:
NOTREACHED();
break;
@@ -91,6 +93,7 @@ do { \
} \
/* Do not rename. HISTOGRAM expects a local variable "name". */ \
std::string name = GetHistogramName(origin, wash, histogram_name); \
+ /* Branching because HISTOGRAM is caching the histogram into a static. */ \
if (wash) { \
HISTOGRAM; \
} else if (origin == ORIGIN_OMNIBOX) { \
@@ -109,6 +112,8 @@ do { \
HISTOGRAM; \
} else if (origin == ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR) { \
HISTOGRAM; \
+ } else if (origin == ORIGIN_OFFLINE) { \
+ HISTOGRAM; \
} else { \
HISTOGRAM; \
} \
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698