OLD | NEW |
---|---|
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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 // We can't use prefs since all services are shutdown at this point. | 268 // We can't use prefs since all services are shutdown at this point. |
269 TimeDelta shutdown_delta = Time::Now() - *g_shutdown_started; | 269 TimeDelta shutdown_delta = Time::Now() - *g_shutdown_started; |
270 std::string shutdown_ms = | 270 std::string shutdown_ms = |
271 base::Int64ToString(shutdown_delta.InMilliseconds()); | 271 base::Int64ToString(shutdown_delta.InMilliseconds()); |
272 int len = static_cast<int>(shutdown_ms.length()) + 1; | 272 int len = static_cast<int>(shutdown_ms.length()) + 1; |
273 base::FilePath shutdown_ms_file = GetShutdownMsPath(); | 273 base::FilePath shutdown_ms_file = GetShutdownMsPath(); |
274 base::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); | 274 base::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); |
275 } | 275 } |
276 | 276 |
277 #if defined(OS_CHROMEOS) | 277 #if defined(OS_CHROMEOS) |
278 chrome::NotifyAndTerminate(false); | 278 chrome::NotifyAndTerminate(/*fast_path=*/false,/*always_reboot=*/false); |
James Cook
2016/11/30 23:01:41
nit: chrome/browser usually does (false /* fast_pa
Greg K
2016/12/01 19:44:43
Done.
| |
279 #endif | 279 #endif |
280 } | 280 } |
281 #endif // !defined(OS_ANDROID) | 281 #endif // !defined(OS_ANDROID) |
282 | 282 |
283 void ReadLastShutdownFile(ShutdownType type, | 283 void ReadLastShutdownFile(ShutdownType type, |
284 int num_procs, | 284 int num_procs, |
285 int num_procs_slow) { | 285 int num_procs_slow) { |
286 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 286 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
287 | 287 |
288 base::FilePath shutdown_ms_file = GetShutdownMsPath(); | 288 base::FilePath shutdown_ms_file = GetShutdownMsPath(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 base::trace_event::TraceConfig trace_config( | 378 base::trace_event::TraceConfig trace_config( |
379 command_line.GetSwitchValueASCII(switches::kTraceShutdown), ""); | 379 command_line.GetSwitchValueASCII(switches::kTraceShutdown), ""); |
380 content::TracingController::GetInstance()->StartTracing( | 380 content::TracingController::GetInstance()->StartTracing( |
381 trace_config, | 381 trace_config, |
382 content::TracingController::StartTracingDoneCallback()); | 382 content::TracingController::StartTracingDoneCallback()); |
383 } | 383 } |
384 TRACE_EVENT0("shutdown", "StartShutdownTracing"); | 384 TRACE_EVENT0("shutdown", "StartShutdownTracing"); |
385 } | 385 } |
386 | 386 |
387 } // namespace browser_shutdown | 387 } // namespace browser_shutdown |
OLD | NEW |