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

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: Actually removed the now uneeded cast from RPH to RPHI. 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('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 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 DCHECK(!navigation_data_->before_unload_delay_.InMicroseconds()); 890 DCHECK(!navigation_data_->before_unload_delay_.InMicroseconds());
891 UMA_HISTOGRAM_TIMES( 891 UMA_HISTOGRAM_TIMES(
892 "Navigation.TimeToCommit_SessionRestored", 892 "Navigation.TimeToCommit_SessionRestored",
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 =
901 static_cast<RenderProcessHostImpl*>(site_instance->GetProcess());
902 bool navigation_created_new_renderer_process = 900 bool navigation_created_new_renderer_process =
903 process_host->init_time() > navigation_data_->start_time_; 901 site_instance->GetProcess()->GetInitTimeForPlzNavigate() >
902 navigation_data_->start_time_;
nasko 2014/10/21 14:50:12 nit: indent by 4 spaces
carlosk 2014/10/21 15:28:13 But this is idented by 4 spaces... I even ran git
nasko 2014/10/21 15:56:14 Hmm, I was under the impression that each breakup
904 if (navigation_created_new_renderer_process) { 903 if (navigation_created_new_renderer_process) {
905 UMA_HISTOGRAM_TIMES( 904 UMA_HISTOGRAM_TIMES(
906 "Navigation.TimeToCommit_NewRenderer_BeforeUnloadDiscounted", 905 "Navigation.TimeToCommit_NewRenderer_BeforeUnloadDiscounted",
907 time_to_commit); 906 time_to_commit);
908 UMA_HISTOGRAM_TIMES( 907 UMA_HISTOGRAM_TIMES(
909 "Navigation.TimeToURLJobStart_NewRenderer_BeforeUnloadDiscounted", 908 "Navigation.TimeToURLJobStart_NewRenderer_BeforeUnloadDiscounted",
910 time_to_network); 909 time_to_network);
911 } else { 910 } else {
912 UMA_HISTOGRAM_TIMES( 911 UMA_HISTOGRAM_TIMES(
913 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 912 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
914 time_to_commit); 913 time_to_commit);
915 UMA_HISTOGRAM_TIMES( 914 UMA_HISTOGRAM_TIMES(
916 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 915 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
917 time_to_network); 916 time_to_network);
918 } 917 }
919 navigation_data_.reset(); 918 navigation_data_.reset();
920 } 919 }
921 920
922 } // namespace content 921 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698