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

Side by Side Diff: chrome/browser/browser_shutdown.cc

Issue 83001: ImportantFileWriter (Closed)
Patch Set: share more code Created 11 years, 8 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 | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/importer/importer.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/importer/importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698