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

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

Issue 150087: Create A/B test of SDCH... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/renderer_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 WebFrame* frame) { 1319 WebFrame* frame) {
1320 UpdateTitle(frame, title); 1320 UpdateTitle(frame, title);
1321 1321
1322 // Also check whether we have new encoding name. 1322 // Also check whether we have new encoding name.
1323 UpdateEncoding(frame, webview->GetMainFrameEncodingName()); 1323 UpdateEncoding(frame, webview->GetMainFrameEncodingName());
1324 } 1324 }
1325 1325
1326 void RenderView::DidFinishLoadForFrame(WebView* webview, WebFrame* frame) { 1326 void RenderView::DidFinishLoadForFrame(WebView* webview, WebFrame* frame) {
1327 WebDataSource* ds = frame->GetDataSource(); 1327 WebDataSource* ds = frame->GetDataSource();
1328 NavigationState* navigation_state = NavigationState::FromDataSource(ds); 1328 NavigationState* navigation_state = NavigationState::FromDataSource(ds);
1329 // TODO(darin): It should not be possible for navigation_state to be null 1329 // TODO(darin): It should not be possible for navigation_state to be null
1330 // here! 1330 // here!
1331 if (navigation_state) 1331 if (navigation_state)
1332 navigation_state->set_finish_load_time(Time::Now()); 1332 navigation_state->set_finish_load_time(Time::Now());
1333 } 1333 }
1334 1334
1335 void RenderView::DidFailLoadWithError(WebView* webview, 1335 void RenderView::DidFailLoadWithError(WebView* webview,
1336 const WebURLError& error, 1336 const WebURLError& error,
1337 WebFrame* frame) { 1337 WebFrame* frame) {
1338 // Currently this function is empty. When you implement something here and it 1338 // Currently this function is empty. When you implement something here and it
1339 // will display any error messages in HTML, please make sure to call 1339 // will display any error messages in HTML, please make sure to call
1340 // frame->SetInViewSourceMode(false) not to show them in view source mode. 1340 // frame->SetInViewSourceMode(false) not to show them in view source mode.
1341 } 1341 }
1342 1342
1343 void RenderView::DidFinishDocumentLoadForFrame(WebView* webview, 1343 void RenderView::DidFinishDocumentLoadForFrame(WebView* webview,
1344 WebFrame* frame) { 1344 WebFrame* frame) {
1345 WebDataSource* ds = frame->GetDataSource(); 1345 WebDataSource* ds = frame->GetDataSource();
1346 NavigationState* navigation_state = NavigationState::FromDataSource(ds); 1346 NavigationState* navigation_state = NavigationState::FromDataSource(ds);
1347 // TODO(darin): It should not be possible for navigation_state to be null 1347 // TODO(darin): It should not be possible for navigation_state to be null
1348 // here! 1348 // here!
1349 if (navigation_state) 1349 if (navigation_state)
1350 navigation_state->set_finish_document_load_time(Time::Now()); 1350 navigation_state->set_finish_document_load_time(Time::Now());
1351 1351
1352 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_)); 1352 Send(new ViewHostMsg_DocumentLoadedInFrame(routing_id_));
1353 1353
1354 // The document has now been fully loaded. Scan for password forms to be 1354 // The document has now been fully loaded. Scan for password forms to be
1355 // sent up to the browser. 1355 // sent up to the browser.
1356 SendPasswordForms(frame); 1356 SendPasswordForms(frame);
1357 1357
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.RequestToStart", start - request); 2887 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.RequestToStart", start - request);
2888 } 2888 }
2889 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.StartToCommit", commit - start); 2889 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.StartToCommit", commit - start);
2890 UMA_HISTOGRAM_MEDIUM_TIMES( 2890 UMA_HISTOGRAM_MEDIUM_TIMES(
2891 "Renderer4.CommitToFinishDoc", finish_doc - commit); 2891 "Renderer4.CommitToFinishDoc", finish_doc - commit);
2892 UMA_HISTOGRAM_MEDIUM_TIMES( 2892 UMA_HISTOGRAM_MEDIUM_TIMES(
2893 "Renderer4.FinishDocToFinish", finish - finish_doc); 2893 "Renderer4.FinishDocToFinish", finish - finish_doc);
2894 2894
2895 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToCommit", commit - begin); 2895 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToCommit", commit - begin);
2896 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToFinishDoc", finish_doc - begin); 2896 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToFinishDoc", finish_doc - begin);
2897
2898 static const TimeDelta kBeginToFinishMin(TimeDelta::FromMilliseconds(10));
2899 static const TimeDelta kBeginToFinishMax(TimeDelta::FromMinutes(10));
2900 static const size_t kBeginToFinishBucketCount(100);
2901
2902 UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.BeginToFinish",
2903 finish - begin, kBeginToFinishMin,
2904 kBeginToFinishMax, kBeginToFinishBucketCount);
2905
2906 DCHECK(FieldTrialList::Find("DnsImpact") &&
2907 !FieldTrialList::Find("DnsImpact")->group_name().empty());
2897 UMA_HISTOGRAM_CUSTOM_TIMES( 2908 UMA_HISTOGRAM_CUSTOM_TIMES(
2898 FieldTrial::MakeName("Renderer4.BeginToFinish", "DnsImpact").data(), 2909 FieldTrial::MakeName("Renderer4.BeginToFinish", "DnsImpact").data(),
2899 finish - begin, TimeDelta::FromMilliseconds(10), 2910 finish - begin, kBeginToFinishMin,
2900 TimeDelta::FromMinutes(10), 100); 2911 kBeginToFinishMax, kBeginToFinishBucketCount);
2912
2913 DCHECK(FieldTrialList::Find("GlobalSdch") &&
2914 !FieldTrialList::Find("GlobalSdch")->group_name().empty());
2915 UMA_HISTOGRAM_CUSTOM_TIMES(
2916 FieldTrial::MakeName("Renderer4.BeginToFinish", "GlobalSdch").data(),
2917 finish - begin, kBeginToFinishMin,
2918 kBeginToFinishMax, kBeginToFinishBucketCount);
2901 2919
2902 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.CommitToFinish", finish - commit); 2920 UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.CommitToFinish", finish - commit);
2903 2921
2904 if (!first_paint.is_null()) { 2922 if (!first_paint.is_null()) {
2905 UMA_HISTOGRAM_MEDIUM_TIMES( 2923 UMA_HISTOGRAM_MEDIUM_TIMES(
2906 "Renderer4.BeginToFirstPaint", first_paint - begin); 2924 "Renderer4.BeginToFirstPaint", first_paint - begin);
2907 UMA_HISTOGRAM_MEDIUM_TIMES( 2925 UMA_HISTOGRAM_MEDIUM_TIMES(
2908 "Renderer4.CommitToFirstPaint", first_paint - commit); 2926 "Renderer4.CommitToFirstPaint", first_paint - commit);
2909 } 2927 }
2910 2928
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2965 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 2983 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
2966 } 2984 }
2967 2985
2968 void RenderView::Print(WebFrame* frame, bool script_initiated) { 2986 void RenderView::Print(WebFrame* frame, bool script_initiated) {
2969 DCHECK(frame); 2987 DCHECK(frame);
2970 if (print_helper_.get() == NULL) { 2988 if (print_helper_.get() == NULL) {
2971 print_helper_.reset(new PrintWebViewHelper(this)); 2989 print_helper_.reset(new PrintWebViewHelper(this));
2972 } 2990 }
2973 print_helper_->Print(frame, script_initiated); 2991 print_helper_->Print(frame, script_initiated);
2974 } 2992 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698