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

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

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comments and rebase Created 5 years, 2 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/renderer/page_load_histograms.h" 5 #include "chrome/renderer/page_load_histograms.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 int websearch_chrome_joint_experiment_id = kNoExperiment; 914 int websearch_chrome_joint_experiment_id = kNoExperiment;
915 bool is_preview = false; 915 bool is_preview = false;
916 if (came_from_websearch) { 916 if (came_from_websearch) {
917 websearch_chrome_joint_experiment_id = 917 websearch_chrome_joint_experiment_id =
918 GetQueryStringBasedExperiment(GURL(frame->document().referrer())); 918 GetQueryStringBasedExperiment(GURL(frame->document().referrer()));
919 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview"); 919 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview");
920 } 920 }
921 921
922 MaybeDumpFirstLayoutHistograms(); 922 MaybeDumpFirstLayoutHistograms();
923 923
924 content::RenderFrame* render_frame =
925 content::RenderFrame::FromWebFrame(frame);
926
924 // Metrics based on the timing information recorded for the Navigation Timing 927 // Metrics based on the timing information recorded for the Navigation Timing
925 // API - http://www.w3.org/TR/navigation-timing/. 928 // API - http://www.w3.org/TR/navigation-timing/.
926 DumpHistograms( 929 DumpHistograms(
927 frame->performance(), document_state, data_reduction_proxy_was_used, 930 frame->performance(), document_state, data_reduction_proxy_was_used,
928 false /* TODO: render_frame->IsUsingLoFi() */, came_from_websearch, 931 render_frame && render_frame->IsUsingLoFi(), came_from_websearch,
929 websearch_chrome_joint_experiment_id, is_preview, scheme_type); 932 websearch_chrome_joint_experiment_id, is_preview, scheme_type);
930 933
931 // Old metrics based on the timing information stored in DocumentState. These 934 // Old metrics based on the timing information stored in DocumentState. These
932 // are deprecated and should go away. 935 // are deprecated and should go away.
933 DumpDeprecatedHistograms(frame->performance(), document_state, 936 DumpDeprecatedHistograms(frame->performance(), document_state,
934 data_reduction_proxy_was_used, 937 data_reduction_proxy_was_used,
935 came_from_websearch, 938 came_from_websearch,
936 websearch_chrome_joint_experiment_id, 939 websearch_chrome_joint_experiment_id,
937 is_preview, 940 is_preview,
938 scheme_type); 941 scheme_type);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 1041
1039 DCHECK(document_state); 1042 DCHECK(document_state);
1040 DCHECK(ds); 1043 DCHECK(ds);
1041 GURL url(ds->request().url()); 1044 GURL url(ds->request().url());
1042 Time start = document_state->start_load_time(); 1045 Time start = document_state->start_load_time();
1043 Time finish = document_state->finish_load_time(); 1046 Time finish = document_state->finish_load_time();
1044 // TODO(mbelshe): should we log more stats? 1047 // TODO(mbelshe): should we log more stats?
1045 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 1048 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
1046 << url.spec(); 1049 << url.spec();
1047 } 1050 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698