| 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_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { | 118 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { |
| 119 // Record the shutdown info so that we can put it into a histogram at next | 119 // Record the shutdown info so that we can put it into a histogram at next |
| 120 // startup. | 120 // startup. |
| 121 prefs->SetInteger(prefs::kShutdownType, shutdown_type_); | 121 prefs->SetInteger(prefs::kShutdownType, shutdown_type_); |
| 122 prefs->SetInteger(prefs::kShutdownNumProcesses, shutdown_num_processes_); | 122 prefs->SetInteger(prefs::kShutdownNumProcesses, shutdown_num_processes_); |
| 123 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, | 123 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, |
| 124 shutdown_num_processes_slow_); | 124 shutdown_num_processes_slow_); |
| 125 } | 125 } |
| 126 | 126 |
| 127 prefs->SavePersistentPrefs(g_browser_process->file_thread()); | 127 prefs->SavePersistentPrefs(); |
| 128 | 128 |
| 129 // Cleanup any statics created by RLZ. Must be done before NotificationService | 129 // Cleanup any statics created by RLZ. Must be done before NotificationService |
| 130 // is destroyed. | 130 // is destroyed. |
| 131 RLZTracker::CleanupRlz(); | 131 RLZTracker::CleanupRlz(); |
| 132 | 132 |
| 133 // The jank'o'meter requires that the browser process has been destroyed | 133 // The jank'o'meter requires that the browser process has been destroyed |
| 134 // before calling UninstallJankometer(). | 134 // before calling UninstallJankometer(). |
| 135 delete g_browser_process; | 135 delete g_browser_process; |
| 136 g_browser_process = NULL; | 136 g_browser_process = NULL; |
| 137 | 137 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 TimeDelta::FromMilliseconds(shutdown_ms)); | 200 TimeDelta::FromMilliseconds(shutdown_ms)); |
| 201 UMA_HISTOGRAM_TIMES(time_per.c_str(), | 201 UMA_HISTOGRAM_TIMES(time_per.c_str(), |
| 202 TimeDelta::FromMilliseconds(shutdown_ms / num_procs)); | 202 TimeDelta::FromMilliseconds(shutdown_ms / num_procs)); |
| 203 UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.total", num_procs); | 203 UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.total", num_procs); |
| 204 UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.slow", num_procs_slow); | 204 UMA_HISTOGRAM_COUNTS_100("Shutdown.renderers.slow", num_procs_slow); |
| 205 } | 205 } |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace browser_shutdown | 209 } // namespace browser_shutdown |
| OLD | NEW |