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

Side by Side Diff: chrome/renderer/page_load_histograms.cc

Issue 6966016: Handle <link rel=prerender> in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tone down the over-aggressive search and replace... Created 9 years, 7 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 | 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/renderer/page_load_histograms.h" 5 #include "chrome/renderer/page_load_histograms.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 PLT_HISTOGRAM(base::FieldTrial::MakeName( 299 PLT_HISTOGRAM(base::FieldTrial::MakeName(
300 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"), 300 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"),
301 begin_to_finish_all_loads); 301 begin_to_finish_all_loads);
302 break; 302 break;
303 default: 303 default:
304 break; 304 break;
305 } 305 }
306 } 306 }
307 307
308 // Histograms to determine if content prefetching has an impact on PLT. 308 // Histograms to determine if content prefetching has an impact on PLT.
309 // TODO(gavinp): Right now the prerendering and the prefetching field trials
310 // are mixed together. If we continue to launch prerender with
311 // link rel=prerender, then we should separate them.
309 static const bool prefetching_fieldtrial = 312 static const bool prefetching_fieldtrial =
310 base::FieldTrialList::TrialExists("Prefetch"); 313 base::FieldTrialList::TrialExists("Prefetch");
311 if (prefetching_fieldtrial) { 314 if (prefetching_fieldtrial) {
312 if (navigation_state->was_prefetcher()) { 315 if (navigation_state->was_prefetcher()) {
313 PLT_HISTOGRAM(base::FieldTrial::MakeName( 316 PLT_HISTOGRAM(base::FieldTrial::MakeName(
314 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"), 317 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"),
315 begin_to_finish_doc); 318 begin_to_finish_doc);
316 PLT_HISTOGRAM(base::FieldTrial::MakeName( 319 PLT_HISTOGRAM(base::FieldTrial::MakeName(
317 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"), 320 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"),
318 begin_to_finish_all_loads); 321 begin_to_finish_all_loads);
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 823
821 DCHECK(state); 824 DCHECK(state);
822 DCHECK(ds); 825 DCHECK(ds);
823 GURL url(ds->request().url()); 826 GURL url(ds->request().url());
824 Time start = state->start_load_time(); 827 Time start = state->start_load_time();
825 Time finish = state->finish_load_time(); 828 Time finish = state->finish_load_time();
826 // TODO(mbelshe): should we log more stats? 829 // TODO(mbelshe): should we log more stats?
827 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 830 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
828 << url.spec(); 831 << url.spec();
829 } 832 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/test/data/prerender/prerender_infinite_a.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698