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

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

Issue 2697513009: Enable forced prerenders on wifi (Closed)
Patch Set: Created 3 years, 10 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
Index: chrome/browser/prerender/prerender_histograms.cc
diff --git a/chrome/browser/prerender/prerender_histograms.cc b/chrome/browser/prerender/prerender_histograms.cc
index d7ea7309607e65c57d8c91aa51bf9107d45037cc..5b68c37afdda01542c2517c42d36e58909abf755 100644
--- a/chrome/browser/prerender/prerender_histograms.cc
+++ b/chrome/browser/prerender/prerender_histograms.cc
@@ -96,7 +96,7 @@ std::string GetHistogramName(Origin origin, bool is_wash,
return ComposeHistogramName("webnext", name);
case ORIGIN_GWS_PRERENDER:
return ComposeHistogramName("gws", name);
- case ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR:
+ case ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER:
return ComposeHistogramName("externalrequestforced", name);
case ORIGIN_OFFLINE:
return ComposeHistogramName("offline", name);
@@ -130,40 +130,40 @@ const char* FirstContentfulPaintHiddenName(bool was_hidden) {
HISTOGRAM) \
PREFIXED_HISTOGRAM_INTERNAL(origin, false, HISTOGRAM, histogram_name)
-#define PREFIXED_HISTOGRAM_INTERNAL(origin, wash, HISTOGRAM, histogram_name) \
-do { \
- { \
- /* Do not rename. HISTOGRAM expects a local variable "name". */ \
- std::string name = ComposeHistogramName(std::string(), histogram_name); \
- HISTOGRAM; \
- } \
- /* 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) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_NONE) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_EXTERNAL_REQUEST) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_INSTANT) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_LINK_REL_NEXT) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_EXTERNAL_REQUEST_FORCED_CELLULAR) { \
- HISTOGRAM; \
- } else if (origin == ORIGIN_OFFLINE) { \
- HISTOGRAM; \
- } else { \
- HISTOGRAM; \
- } \
-} while (0)
+#define PREFIXED_HISTOGRAM_INTERNAL(origin, wash, HISTOGRAM, histogram_name) \
+ do { \
+ { \
+ /* Do not rename. HISTOGRAM expects a local variable "name". */ \
+ std::string name = ComposeHistogramName(std::string(), histogram_name); \
+ HISTOGRAM; \
+ } \
+ /* 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) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_NONE) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_EXTERNAL_REQUEST) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_INSTANT) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_LINK_REL_NEXT) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER) { \
+ HISTOGRAM; \
+ } else if (origin == ORIGIN_OFFLINE) { \
+ HISTOGRAM; \
+ } else { \
+ HISTOGRAM; \
+ } \
+ } while (0)
PrerenderHistograms::PrerenderHistograms()
: last_origin_(ORIGIN_MAX),
« no previous file with comments | « chrome/browser/prerender/external_prerender_handler_android.cc ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698