| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 8 |
| 9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 resource_dispatcher_host_.reset(); | 185 resource_dispatcher_host_.reset(); |
| 186 | 186 |
| 187 // Wait for the pending print jobs to finish. | 187 // Wait for the pending print jobs to finish. |
| 188 print_job_manager_->OnQuit(); | 188 print_job_manager_->OnQuit(); |
| 189 print_job_manager_.reset(); | 189 print_job_manager_.reset(); |
| 190 | 190 |
| 191 // Destroy TabCloseableStateWatcher before NotificationService since the | 191 // Destroy TabCloseableStateWatcher before NotificationService since the |
| 192 // former registers for notifications. | 192 // former registers for notifications. |
| 193 tab_closeable_state_watcher_.reset(); | 193 tab_closeable_state_watcher_.reset(); |
| 194 | 194 |
| 195 // Destroy NotificationUIManager before NotificationService is shut down. |
| 196 notification_ui_manager_.reset(); |
| 197 |
| 195 // Now OK to destroy NotificationService. | 198 // Now OK to destroy NotificationService. |
| 196 main_notification_service_.reset(); | 199 main_notification_service_.reset(); |
| 197 | 200 |
| 198 // Prior to clearing local state, we want to complete tasks pending | 201 // Prior to clearing local state, we want to complete tasks pending |
| 199 // on the db thread too. | 202 // on the db thread too. |
| 200 db_thread_.reset(); | 203 db_thread_.reset(); |
| 201 | 204 |
| 202 // At this point, no render process exist and the file, io, db, and | 205 // At this point, no render process exist and the file, io, db, and |
| 203 // webkit threads in this process have all terminated, so it's safe | 206 // webkit threads in this process have all terminated, so it's safe |
| 204 // to access local state data such as cookies, database, or local storage. | 207 // to access local state data such as cookies, database, or local storage. |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 600 } |
| 598 | 601 |
| 599 void BrowserProcessImpl::OnAutoupdateTimer() { | 602 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 600 if (CanAutorestartForUpdate()) { | 603 if (CanAutorestartForUpdate()) { |
| 601 DLOG(WARNING) << "Detected update. Restarting browser."; | 604 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 602 RestartPersistentInstance(); | 605 RestartPersistentInstance(); |
| 603 } | 606 } |
| 604 } | 607 } |
| 605 | 608 |
| 606 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 609 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |