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

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

Issue 16950028: Move file_util::Delete to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void ReadLastShutdownFile(ShutdownType type, 260 void ReadLastShutdownFile(ShutdownType type,
261 int num_procs, 261 int num_procs,
262 int num_procs_slow) { 262 int num_procs_slow) {
263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
264 264
265 base::FilePath shutdown_ms_file = GetShutdownMsPath(); 265 base::FilePath shutdown_ms_file = GetShutdownMsPath();
266 std::string shutdown_ms_str; 266 std::string shutdown_ms_str;
267 int64 shutdown_ms = 0; 267 int64 shutdown_ms = 0;
268 if (file_util::ReadFileToString(shutdown_ms_file, &shutdown_ms_str)) 268 if (file_util::ReadFileToString(shutdown_ms_file, &shutdown_ms_str))
269 base::StringToInt64(shutdown_ms_str, &shutdown_ms); 269 base::StringToInt64(shutdown_ms_str, &shutdown_ms);
270 file_util::Delete(shutdown_ms_file, false); 270 base::Delete(shutdown_ms_file, false);
271 271
272 if (type == NOT_VALID || shutdown_ms == 0 || num_procs == 0) 272 if (type == NOT_VALID || shutdown_ms == 0 || num_procs == 0)
273 return; 273 return;
274 274
275 const char* time_fmt = "Shutdown.%s.time"; 275 const char* time_fmt = "Shutdown.%s.time";
276 const char* time_per_fmt = "Shutdown.%s.time_per_process"; 276 const char* time_per_fmt = "Shutdown.%s.time_per_process";
277 std::string time; 277 std::string time;
278 std::string time_per; 278 std::string time_per;
279 if (type == WINDOW_CLOSE) { 279 if (type == WINDOW_CLOSE) {
280 time = base::StringPrintf(time_fmt, "window_close"); 280 time = base::StringPrintf(time_fmt, "window_close");
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 bool ShuttingDownWithoutClosingBrowsers() { 329 bool ShuttingDownWithoutClosingBrowsers() {
330 return g_shutting_down_without_closing_browsers; 330 return g_shutting_down_without_closing_browsers;
331 } 331 }
332 332
333 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { 333 void SetShuttingDownWithoutClosingBrowsers(bool without_close) {
334 g_shutting_down_without_closing_browsers = without_close; 334 g_shutting_down_without_closing_browsers = without_close;
335 } 335 }
336 336
337 } // namespace browser_shutdown 337 } // namespace browser_shutdown
OLDNEW
« no previous file with comments | « chrome/browser/android/crash_dump_manager.cc ('k') | chrome/browser/chrome_to_mobile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698