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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // clear the prefs immediately so we don't pick them up on a future run | 328 // clear the prefs immediately so we don't pick them up on a future run |
329 prefs->SetInteger(prefs::kShutdownType, NOT_VALID); | 329 prefs->SetInteger(prefs::kShutdownType, NOT_VALID); |
330 prefs->SetInteger(prefs::kShutdownNumProcesses, 0); | 330 prefs->SetInteger(prefs::kShutdownNumProcesses, 0); |
331 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0); | 331 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0); |
332 | 332 |
333 UMA_HISTOGRAM_ENUMERATION("Shutdown.ShutdownType", type, kNumShutdownTypes); | 333 UMA_HISTOGRAM_ENUMERATION("Shutdown.ShutdownType", type, kNumShutdownTypes); |
334 | 334 |
335 // Read and delete the file on the file thread. | 335 // Read and delete the file on the file thread. |
336 BrowserThread::PostTask( | 336 BrowserThread::PostTask( |
337 BrowserThread::FILE, FROM_HERE, | 337 BrowserThread::FILE, FROM_HERE, |
338 base::Bind(&ReadLastShutdownFile, type, num_procs, num_procs_slow)); | 338 base::BindOnce(&ReadLastShutdownFile, type, num_procs, num_procs_slow)); |
339 } | 339 } |
340 | 340 |
341 void SetTryingToQuit(bool quitting) { | 341 void SetTryingToQuit(bool quitting) { |
342 g_trying_to_quit = quitting; | 342 g_trying_to_quit = quitting; |
343 | 343 |
344 if (quitting) | 344 if (quitting) |
345 return; | 345 return; |
346 | 346 |
347 // Reset the restart-related preferences. They get set unconditionally through | 347 // Reset the restart-related preferences. They get set unconditionally through |
348 // calls such as chrome::AttemptRestart(), and need to be reset if the restart | 348 // calls such as chrome::AttemptRestart(), and need to be reset if the restart |
(...skipping 22 matching lines...) Expand all Loading... |
371 base::trace_event::TraceConfig trace_config( | 371 base::trace_event::TraceConfig trace_config( |
372 command_line.GetSwitchValueASCII(switches::kTraceShutdown), ""); | 372 command_line.GetSwitchValueASCII(switches::kTraceShutdown), ""); |
373 content::TracingController::GetInstance()->StartTracing( | 373 content::TracingController::GetInstance()->StartTracing( |
374 trace_config, | 374 trace_config, |
375 content::TracingController::StartTracingDoneCallback()); | 375 content::TracingController::StartTracingDoneCallback()); |
376 } | 376 } |
377 TRACE_EVENT0("shutdown", "StartShutdownTracing"); | 377 TRACE_EVENT0("shutdown", "StartShutdownTracing"); |
378 } | 378 } |
379 | 379 |
380 } // namespace browser_shutdown | 380 } // namespace browser_shutdown |
OLD | NEW |