| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ExtensionTabIdMap::GetInstance()->Init(); | 164 ExtensionTabIdMap::GetInstance()->Init(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 BrowserProcessImpl::~BrowserProcessImpl() { | 167 BrowserProcessImpl::~BrowserProcessImpl() { |
| 168 tracked_objects::ThreadData::EnsureCleanupWasCalled(4); | 168 tracked_objects::ThreadData::EnsureCleanupWasCalled(4); |
| 169 | 169 |
| 170 g_browser_process = NULL; | 170 g_browser_process = NULL; |
| 171 } | 171 } |
| 172 | 172 |
| 173 void BrowserProcessImpl::StartTearDown() { | 173 void BrowserProcessImpl::StartTearDown() { |
| 174 io_thread()->StartTearDown(); |
| 175 |
| 174 #if defined(ENABLE_AUTOMATION) | 176 #if defined(ENABLE_AUTOMATION) |
| 175 // Delete the AutomationProviderList before NotificationService, | 177 // Delete the AutomationProviderList before NotificationService, |
| 176 // since it may try to unregister notifications | 178 // since it may try to unregister notifications |
| 177 // Both NotificationService and AutomationProvider are singleton instances in | 179 // Both NotificationService and AutomationProvider are singleton instances in |
| 178 // the BrowserProcess. Since AutomationProvider may have some active | 180 // the BrowserProcess. Since AutomationProvider may have some active |
| 179 // notification observers, it is essential that it gets destroyed before the | 181 // notification observers, it is essential that it gets destroyed before the |
| 180 // NotificationService. NotificationService won't be destroyed until after | 182 // NotificationService. NotificationService won't be destroyed until after |
| 181 // this destructor is run. | 183 // this destructor is run. |
| 182 automation_provider_list_.reset(); | 184 automation_provider_list_.reset(); |
| 183 #endif | 185 #endif |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 } | 947 } |
| 946 | 948 |
| 947 void BrowserProcessImpl::OnAutoupdateTimer() { | 949 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 948 if (CanAutorestartForUpdate()) { | 950 if (CanAutorestartForUpdate()) { |
| 949 DLOG(WARNING) << "Detected update. Restarting browser."; | 951 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 950 RestartBackgroundInstance(); | 952 RestartBackgroundInstance(); |
| 951 } | 953 } |
| 952 } | 954 } |
| 953 | 955 |
| 954 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 956 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |