| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // Clean up state that lives on or uses the file_thread_ before | 266 // Clean up state that lives on or uses the file_thread_ before |
| 267 // it goes away. | 267 // it goes away. |
| 268 if (resource_dispatcher_host_.get()) { | 268 if (resource_dispatcher_host_.get()) { |
| 269 resource_dispatcher_host()->download_file_manager()->Shutdown(); | 269 resource_dispatcher_host()->download_file_manager()->Shutdown(); |
| 270 resource_dispatcher_host()->save_file_manager()->Shutdown(); | 270 resource_dispatcher_host()->save_file_manager()->Shutdown(); |
| 271 } | 271 } |
| 272 break; | 272 break; |
| 273 case BrowserThread::WEBKIT: | 273 case BrowserThread::WEBKIT: |
| 274 // Need to destroy ResourceDispatcherHost before PluginService | 274 // Need to destroy ResourceDispatcherHost before PluginService |
| 275 // and SafeBrowsingService, since it caches a pointer to | 275 // and SafeBrowsingService, since it caches a pointer to |
| 276 // it. This also causes the webkit thread to terminate (which is | 276 // it. |
| 277 // still the responsibility of the embedder, not of the content | |
| 278 // framework). | |
| 279 resource_dispatcher_host_.reset(); | 277 resource_dispatcher_host_.reset(); |
| 280 break; | 278 break; |
| 281 default: | 279 default: |
| 282 break; | 280 break; |
| 283 } | 281 } |
| 284 } | 282 } |
| 285 | 283 |
| 286 void BrowserProcessImpl::PostStopThread(BrowserThread::ID thread_id) { | 284 void BrowserProcessImpl::PostStopThread(BrowserThread::ID thread_id) { |
| 287 switch (thread_id) { | 285 switch (thread_id) { |
| 288 case BrowserThread::FILE: | 286 case BrowserThread::FILE: |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 } | 1006 } |
| 1009 | 1007 |
| 1010 void BrowserProcessImpl::OnAutoupdateTimer() { | 1008 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1011 if (CanAutorestartForUpdate()) { | 1009 if (CanAutorestartForUpdate()) { |
| 1012 DLOG(WARNING) << "Detected update. Restarting browser."; | 1010 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1013 RestartBackgroundInstance(); | 1011 RestartBackgroundInstance(); |
| 1014 } | 1012 } |
| 1015 } | 1013 } |
| 1016 | 1014 |
| 1017 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1015 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |