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

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

Issue 8772041: Remove deprecated TabContentsDelegate::OpenURLFromTab variant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 last_origin_ = origin; 147 last_origin_ = origin;
148 last_experiment_id_ = experiment; 148 last_experiment_id_ = experiment;
149 149
150 // If we observe multiple tags within the 30 second window, we will still 150 // If we observe multiple tags within the 30 second window, we will still
151 // reset the window to begin at the most recent occurrence, so that we will 151 // reset the window to begin at the most recent occurrence, so that we will
152 // always be in a window in the 30 seconds from each occurrence. 152 // always be in a window in the 30 seconds from each occurrence.
153 last_prerender_seen_time_ = GetCurrentTimeTicks(); 153 last_prerender_seen_time_ = GetCurrentTimeTicks();
154 seen_any_pageload_ = false; 154 seen_any_pageload_ = false;
155 seen_pageload_started_after_prerender_ = false; 155 seen_pageload_started_after_prerender_ = false;
156 }
156 157
158 void PrerenderHistograms::RecordPrerenderStarted(Origin origin) const {
157 if (OriginIsOmnibox(origin)) { 159 if (OriginIsOmnibox(origin)) {
158 UMA_HISTOGRAM_COUNTS("Prerender.OmniboxPrerenderCount_" + 160 UMA_HISTOGRAM_COUNTS("Prerender.OmniboxPrerenderCount_" +
159 GetOmniboxHistogramSuffix(), 1); 161 GetOmniboxHistogramSuffix(), 1);
160 } 162 }
161 } 163 }
162 164
163 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const { 165 void PrerenderHistograms::RecordUsedPrerender(Origin origin) const {
164 if (OriginIsOmnibox(origin)) { 166 if (OriginIsOmnibox(origin)) {
165 UMA_HISTOGRAM_COUNTS("Prerender.OmniboxNavigationsUsedPrerenderCount_" + 167 UMA_HISTOGRAM_COUNTS("Prerender.OmniboxNavigationsUsedPrerenderCount_" +
166 GetOmniboxHistogramSuffix(), 1); 168 GetOmniboxHistogramSuffix(), 1);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return last_origin_; 293 return last_origin_;
292 } 294 }
293 295
294 bool PrerenderHistograms::IsOriginExperimentWash() const { 296 bool PrerenderHistograms::IsOriginExperimentWash() const {
295 if (!WithinWindow()) 297 if (!WithinWindow())
296 return false; 298 return false;
297 return origin_experiment_wash_; 299 return origin_experiment_wash_;
298 } 300 }
299 301
300 } // namespace prerender 302 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_histograms.h ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698