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

Side by Side Diff: chrome/browser/prerender/prerender_histograms.cc

Issue 1077433002: Remove PrerenderLocalPredictor, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prerender/prerender_histograms.h" 5 #include "chrome/browser/prerender/prerender_histograms.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 switch (origin) { 50 switch (origin) {
51 case ORIGIN_OMNIBOX: 51 case ORIGIN_OMNIBOX:
52 return ComposeHistogramName("omnibox", name); 52 return ComposeHistogramName("omnibox", name);
53 case ORIGIN_NONE: 53 case ORIGIN_NONE:
54 return ComposeHistogramName("none", name); 54 return ComposeHistogramName("none", name);
55 case ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN: 55 case ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN:
56 return ComposeHistogramName("websame", name); 56 return ComposeHistogramName("websame", name);
57 case ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN: 57 case ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN:
58 return ComposeHistogramName("webcross", name); 58 return ComposeHistogramName("webcross", name);
59 case ORIGIN_LOCAL_PREDICTOR:
60 return ComposeHistogramName("localpredictor", name);
61 case ORIGIN_EXTERNAL_REQUEST: 59 case ORIGIN_EXTERNAL_REQUEST:
62 return ComposeHistogramName("externalrequest", name); 60 return ComposeHistogramName("externalrequest", name);
63 case ORIGIN_INSTANT: 61 case ORIGIN_INSTANT:
64 return ComposeHistogramName("Instant", name); 62 return ComposeHistogramName("Instant", name);
65 case ORIGIN_LINK_REL_NEXT: 63 case ORIGIN_LINK_REL_NEXT:
66 return ComposeHistogramName("webnext", name); 64 return ComposeHistogramName("webnext", name);
67 case ORIGIN_GWS_PRERENDER: // Handled above. 65 case ORIGIN_GWS_PRERENDER: // Handled above.
68 default: 66 default:
69 NOTREACHED(); 67 NOTREACHED();
70 break; 68 break;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 (origin != ORIGIN_GWS_PRERENDER || \ 118 (origin != ORIGIN_GWS_PRERENDER || \
121 experiment != recording_experiment)) { \ 119 experiment != recording_experiment)) { \
122 } else if (origin == ORIGIN_OMNIBOX) { \ 120 } else if (origin == ORIGIN_OMNIBOX) { \
123 HISTOGRAM; \ 121 HISTOGRAM; \
124 } else if (origin == ORIGIN_NONE) { \ 122 } else if (origin == ORIGIN_NONE) { \
125 HISTOGRAM; \ 123 HISTOGRAM; \
126 } else if (origin == ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN) { \ 124 } else if (origin == ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN) { \
127 HISTOGRAM; \ 125 HISTOGRAM; \
128 } else if (origin == ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN) { \ 126 } else if (origin == ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN) { \
129 HISTOGRAM; \ 127 HISTOGRAM; \
130 } else if (origin == ORIGIN_LOCAL_PREDICTOR) { \
131 HISTOGRAM; \
132 } else if (origin == ORIGIN_EXTERNAL_REQUEST) { \ 128 } else if (origin == ORIGIN_EXTERNAL_REQUEST) { \
133 HISTOGRAM; \ 129 HISTOGRAM; \
134 } else if (origin == ORIGIN_INSTANT) { \ 130 } else if (origin == ORIGIN_INSTANT) { \
135 HISTOGRAM; \ 131 HISTOGRAM; \
136 } else if (origin == ORIGIN_LINK_REL_NEXT) { \ 132 } else if (origin == ORIGIN_LINK_REL_NEXT) { \
137 HISTOGRAM; \ 133 HISTOGRAM; \
138 } else if (experiment != kNoExperiment) { \ 134 } else if (experiment != kNoExperiment) { \
139 HISTOGRAM; \ 135 HISTOGRAM; \
140 } else { \ 136 } else { \
141 HISTOGRAM; \ 137 HISTOGRAM; \
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 return last_experiment_id_; 432 return last_experiment_id_;
437 } 433 }
438 434
439 bool PrerenderHistograms::IsOriginExperimentWash() const { 435 bool PrerenderHistograms::IsOriginExperimentWash() const {
440 if (!WithinWindow()) 436 if (!WithinWindow())
441 return false; 437 return false;
442 return origin_experiment_wash_; 438 return origin_experiment_wash_;
443 } 439 }
444 440
445 } // namespace prerender 441 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.h ('k') | chrome/browser/prerender/prerender_local_predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698