OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 resource_dispatcher_host_.reset(); | 280 resource_dispatcher_host_.reset(); |
281 | 281 |
282 // Wait for the pending print jobs to finish. | 282 // Wait for the pending print jobs to finish. |
283 print_job_manager_->OnQuit(); | 283 print_job_manager_->OnQuit(); |
284 print_job_manager_.reset(); | 284 print_job_manager_.reset(); |
285 | 285 |
286 // Destroy TabCloseableStateWatcher before NotificationService since the | 286 // Destroy TabCloseableStateWatcher before NotificationService since the |
287 // former registers for notifications. | 287 // former registers for notifications. |
288 tab_closeable_state_watcher_.reset(); | 288 tab_closeable_state_watcher_.reset(); |
289 | 289 |
| 290 tracked_objects::ThreadData::EnsureCleanupWasCalled(4); |
| 291 |
290 g_browser_process = NULL; | 292 g_browser_process = NULL; |
291 } | 293 } |
292 | 294 |
293 #if defined(OS_WIN) | 295 #if defined(OS_WIN) |
294 // Send a QuitTask to the given MessageLoop when the (file) thread has processed | 296 // Send a QuitTask to the given MessageLoop when the (file) thread has processed |
295 // our (other) recent requests (to save preferences). | 297 // our (other) recent requests (to save preferences). |
296 // Change the boolean so that the receiving thread will know that we did indeed | 298 // Change the boolean so that the receiving thread will know that we did indeed |
297 // send the QuitTask that terminated the message loop. | 299 // send the QuitTask that terminated the message loop. |
298 static void PostQuit(MessageLoop* message_loop) { | 300 static void PostQuit(MessageLoop* message_loop) { |
299 g_end_session_file_thread_has_completed = true; | 301 g_end_session_file_thread_has_completed = true; |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 } | 1102 } |
1101 | 1103 |
1102 void BrowserProcessImpl::OnAutoupdateTimer() { | 1104 void BrowserProcessImpl::OnAutoupdateTimer() { |
1103 if (CanAutorestartForUpdate()) { | 1105 if (CanAutorestartForUpdate()) { |
1104 DLOG(WARNING) << "Detected update. Restarting browser."; | 1106 DLOG(WARNING) << "Detected update. Restarting browser."; |
1105 RestartBackgroundInstance(); | 1107 RestartBackgroundInstance(); |
1106 } | 1108 } |
1107 } | 1109 } |
1108 | 1110 |
1109 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1111 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |