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_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 } | 1337 } |
1338 } | 1338 } |
1339 | 1339 |
1340 void BrowserProcessImpl::Unpin() { | 1340 void BrowserProcessImpl::Unpin() { |
1341 DCHECK(CalledOnValidThread()); | 1341 DCHECK(CalledOnValidThread()); |
1342 release_last_reference_callstack_ = base::debug::StackTrace(); | 1342 release_last_reference_callstack_ = base::debug::StackTrace(); |
1343 | 1343 |
1344 shutting_down_ = true; | 1344 shutting_down_ = true; |
1345 #if BUILDFLAG(ENABLE_PRINTING) | 1345 #if BUILDFLAG(ENABLE_PRINTING) |
1346 // Wait for the pending print jobs to finish. Don't do this later, since | 1346 // Wait for the pending print jobs to finish. Don't do this later, since |
1347 // this might cause a nested message loop to run, and we don't want pending | 1347 // this might cause a nested run loop to run, and we don't want pending |
1348 // tasks to run once teardown has started. | 1348 // tasks to run once teardown has started. |
1349 print_job_manager_->Shutdown(); | 1349 print_job_manager_->Shutdown(); |
1350 #endif | 1350 #endif |
1351 | 1351 |
1352 #if defined(LEAK_SANITIZER) | 1352 #if defined(LEAK_SANITIZER) |
1353 // Check for memory leaks now, before we start shutting down threads. Doing | 1353 // Check for memory leaks now, before we start shutting down threads. Doing |
1354 // this early means we won't report any shutdown-only leaks (as they have | 1354 // this early means we won't report any shutdown-only leaks (as they have |
1355 // not yet happened at this point). | 1355 // not yet happened at this point). |
1356 // If leaks are found, this will make the process exit immediately. | 1356 // If leaks are found, this will make the process exit immediately. |
1357 __lsan_do_leak_check(); | 1357 __lsan_do_leak_check(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 } | 1427 } |
1428 | 1428 |
1429 void BrowserProcessImpl::OnAutoupdateTimer() { | 1429 void BrowserProcessImpl::OnAutoupdateTimer() { |
1430 if (CanAutorestartForUpdate()) { | 1430 if (CanAutorestartForUpdate()) { |
1431 DLOG(WARNING) << "Detected update. Restarting browser."; | 1431 DLOG(WARNING) << "Detected update. Restarting browser."; |
1432 RestartBackgroundInstance(); | 1432 RestartBackgroundInstance(); |
1433 } | 1433 } |
1434 } | 1434 } |
1435 | 1435 |
1436 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1436 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |