| OLD | NEW |
| 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 Loading... |
| 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()->GetInitTimeForNavigationMetrics() > |
| 902 navigation_data_->start_time_; |
| 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 |
| OLD | NEW |