OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser/browser_shutdown.h" | 5 #include "chrome/browser/browser_shutdown.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/histogram.h" | 8 #include "base/histogram.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/jankometer.h" | 13 #include "chrome/browser/jankometer.h" |
14 #include "chrome/browser/metrics_service.h" | 14 #include "chrome/browser/metrics_service.h" |
15 #include "chrome/browser/plugin_process_host.h" | 15 #include "chrome/browser/plugin_process_host.h" |
16 #include "chrome/browser/plugin_service.h" | 16 #include "chrome/browser/plugin_service.h" |
17 #include "chrome/browser/render_process_host.h" | 17 #include "chrome/browser/render_process_host.h" |
18 #include "chrome/browser/render_view_host.h" | 18 #include "chrome/browser/render_view_host.h" |
19 #include "chrome/browser/render_widget_host.h" | 19 #include "chrome/browser/render_widget_host.h" |
20 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/pref_service.h" | 22 #include "chrome/common/pref_service.h" |
23 #include "chrome/common/resource_bundle.h" | 23 #include "chrome/common/resource_bundle.h" |
24 #include "chrome/browser/plugin_service.h" | 24 #include "chrome/browser/plugin_service.h" |
25 #include "net/dns_global.h" | 25 #include "net/dns_global.h" |
26 | 26 |
| 27 using base::Time; |
| 28 using base::TimeDelta; |
| 29 |
27 namespace browser_shutdown { | 30 namespace browser_shutdown { |
28 | 31 |
29 Time shutdown_started_; | 32 Time shutdown_started_; |
30 ShutdownType shutdown_type_ = NOT_VALID; | 33 ShutdownType shutdown_type_ = NOT_VALID; |
31 int shutdown_num_processes_; | 34 int shutdown_num_processes_; |
32 int shutdown_num_processes_slow_; | 35 int shutdown_num_processes_slow_; |
33 | 36 |
34 const wchar_t* const kShutdownMsFile = L"chrome_shutdown_ms.txt"; | 37 const wchar_t* const kShutdownMsFile = L"chrome_shutdown_ms.txt"; |
35 | 38 |
36 void RegisterPrefs(PrefService* local_state) { | 39 void RegisterPrefs(PrefService* local_state) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 UMA_HISTOGRAM_TIMES(time_per.c_str(), | 177 UMA_HISTOGRAM_TIMES(time_per.c_str(), |
175 TimeDelta::FromMilliseconds(shutdown_ms / num_procs)); | 178 TimeDelta::FromMilliseconds(shutdown_ms / num_procs)); |
176 UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.total", num_procs); | 179 UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.total", num_procs); |
177 UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.slow", num_procs_slow); | 180 UMA_HISTOGRAM_COUNTS_100(L"Shutdown.renderers.slow", num_procs_slow); |
178 } | 181 } |
179 } | 182 } |
180 } | 183 } |
181 | 184 |
182 } // namespace browser_shutdown | 185 } // namespace browser_shutdown |
183 | 186 |
OLD | NEW |