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

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: addressing comments 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 int websearch_chrome_joint_experiment_id = kNoExperiment; 902 int websearch_chrome_joint_experiment_id = kNoExperiment;
903 bool is_preview = false; 903 bool is_preview = false;
904 if (came_from_websearch) { 904 if (came_from_websearch) {
905 websearch_chrome_joint_experiment_id = 905 websearch_chrome_joint_experiment_id =
906 GetQueryStringBasedExperiment(GURL(frame->document().referrer())); 906 GetQueryStringBasedExperiment(GURL(frame->document().referrer()));
907 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview"); 907 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview");
908 } 908 }
909 909
910 MaybeDumpFirstLayoutHistograms(); 910 MaybeDumpFirstLayoutHistograms();
911 911
912 content::RenderFrame* render_frame =
913 content::RenderFrame::FromWebFrame(frame);
bengr 2015/10/20 16:30:51 It looks like this can return null, but then you u
megjablon 2015/10/20 17:46:35 Done.
914
912 // Metrics based on the timing information recorded for the Navigation Timing 915 // Metrics based on the timing information recorded for the Navigation Timing
913 // API - http://www.w3.org/TR/navigation-timing/. 916 // API - http://www.w3.org/TR/navigation-timing/.
914 DumpHistograms( 917 DumpHistograms(frame->performance(), document_state,
915 frame->performance(), document_state, data_reduction_proxy_was_used, 918 data_reduction_proxy_was_used, render_frame->IsUsingLoFi(),
916 false /* TODO: render_frame->IsUsingLoFi() */, came_from_websearch, 919 came_from_websearch, websearch_chrome_joint_experiment_id,
917 websearch_chrome_joint_experiment_id, is_preview, scheme_type); 920 is_preview, scheme_type);
918 921
919 // Old metrics based on the timing information stored in DocumentState. These 922 // Old metrics based on the timing information stored in DocumentState. These
920 // are deprecated and should go away. 923 // are deprecated and should go away.
921 DumpDeprecatedHistograms(frame->performance(), document_state, 924 DumpDeprecatedHistograms(frame->performance(), document_state,
922 data_reduction_proxy_was_used, 925 data_reduction_proxy_was_used,
923 came_from_websearch, 926 came_from_websearch,
924 websearch_chrome_joint_experiment_id, 927 websearch_chrome_joint_experiment_id,
925 is_preview, 928 is_preview,
926 scheme_type); 929 scheme_type);
927 930
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1029
1027 DCHECK(document_state); 1030 DCHECK(document_state);
1028 DCHECK(ds); 1031 DCHECK(ds);
1029 GURL url(ds->request().url()); 1032 GURL url(ds->request().url());
1030 Time start = document_state->start_load_time(); 1033 Time start = document_state->start_load_time();
1031 Time finish = document_state->finish_load_time(); 1034 Time finish = document_state->finish_load_time();
1032 // TODO(mbelshe): should we log more stats? 1035 // TODO(mbelshe): should we log more stats?
1033 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 1036 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
1034 << url.spec(); 1037 << url.spec();
1035 } 1038 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698