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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 665923002: Moves RenderProcessHostImpl::init_time() to RenderProcessHost to fix broken test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 time_to_commit); 893 time_to_commit);
894 UMA_HISTOGRAM_TIMES( 894 UMA_HISTOGRAM_TIMES(
895 "Navigation.TimeToURLJobStart_SessionRestored", 895 "Navigation.TimeToURLJobStart_SessionRestored",
896 time_to_network); 896 time_to_network);
897 navigation_data_.reset(); 897 navigation_data_.reset();
898 return; 898 return;
899 } 899 }
900 RenderProcessHostImpl* process_host = 900 RenderProcessHostImpl* process_host =
901 static_cast<RenderProcessHostImpl*>(site_instance->GetProcess()); 901 static_cast<RenderProcessHostImpl*>(site_instance->GetProcess());
902 bool navigation_created_new_renderer_process = 902 bool navigation_created_new_renderer_process =
903 process_host->init_time() > navigation_data_->start_time_; 903 process_host->GetInitTime() > navigation_data_->start_time_;
904 if (navigation_created_new_renderer_process) { 904 if (navigation_created_new_renderer_process) {
905 UMA_HISTOGRAM_TIMES( 905 UMA_HISTOGRAM_TIMES(
906 "Navigation.TimeToCommit_NewRenderer_BeforeUnloadDiscounted", 906 "Navigation.TimeToCommit_NewRenderer_BeforeUnloadDiscounted",
907 time_to_commit); 907 time_to_commit);
908 UMA_HISTOGRAM_TIMES( 908 UMA_HISTOGRAM_TIMES(
909 "Navigation.TimeToURLJobStart_NewRenderer_BeforeUnloadDiscounted", 909 "Navigation.TimeToURLJobStart_NewRenderer_BeforeUnloadDiscounted",
910 time_to_network); 910 time_to_network);
911 } else { 911 } else {
912 UMA_HISTOGRAM_TIMES( 912 UMA_HISTOGRAM_TIMES(
913 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 913 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
914 time_to_commit); 914 time_to_commit);
915 UMA_HISTOGRAM_TIMES( 915 UMA_HISTOGRAM_TIMES(
916 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 916 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
917 time_to_network); 917 time_to_network);
918 } 918 }
919 navigation_data_.reset(); 919 navigation_data_.reset();
920 } 920 }
921 921
922 } // namespace content 922 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698