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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/browser/child_process_security_policy.h" | 70 #include "content/browser/child_process_security_policy.h" |
71 #include "content/browser/download/download_status_updater.h" | 71 #include "content/browser/download/download_status_updater.h" |
72 #include "content/browser/download/mhtml_generation_manager.h" | 72 #include "content/browser/download/mhtml_generation_manager.h" |
73 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 73 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
74 #include "content/browser/net/browser_online_state_observer.h" | 74 #include "content/browser/net/browser_online_state_observer.h" |
75 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 75 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
76 #include "content/public/browser/browser_thread.h" | 76 #include "content/public/browser/browser_thread.h" |
77 #include "content/public/browser/notification_details.h" | 77 #include "content/public/browser/notification_details.h" |
78 #include "content/public/browser/plugin_service.h" | 78 #include "content/public/browser/plugin_service.h" |
79 #include "content/public/browser/render_process_host.h" | 79 #include "content/public/browser/render_process_host.h" |
80 #include "content/public/common/url_fetcher.h" | |
81 #include "media/audio/audio_manager.h" | 80 #include "media/audio/audio_manager.h" |
82 #include "net/socket/client_socket_pool_manager.h" | 81 #include "net/socket/client_socket_pool_manager.h" |
83 #include "net/url_request/url_request_context_getter.h" | 82 #include "net/url_request/url_request_context_getter.h" |
84 #include "ui/base/clipboard/clipboard.h" | 83 #include "ui/base/clipboard/clipboard.h" |
85 #include "ui/base/l10n/l10n_util.h" | 84 #include "ui/base/l10n/l10n_util.h" |
86 | 85 |
87 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
88 #include "ui/views/focus/view_storage.h" | 87 #include "ui/views/focus/view_storage.h" |
89 #elif defined(OS_MACOSX) | 88 #elif defined(OS_MACOSX) |
90 #include "chrome/browser/chrome_browser_main_mac.h" | 89 #include "chrome/browser/chrome_browser_main_mac.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 if (safe_browsing_service_.get()) { | 190 if (safe_browsing_service_.get()) { |
192 safe_browsing_service()->ShutDown(); | 191 safe_browsing_service()->ShutDown(); |
193 } | 192 } |
194 #endif | 193 #endif |
195 | 194 |
196 // Need to clear the desktop notification balloons before the io_thread_ and | 195 // Need to clear the desktop notification balloons before the io_thread_ and |
197 // before the profiles, since if there are any still showing we will access | 196 // before the profiles, since if there are any still showing we will access |
198 // those things during teardown. | 197 // those things during teardown. |
199 notification_ui_manager_.reset(); | 198 notification_ui_manager_.reset(); |
200 | 199 |
201 // FIXME - We shouldn't need this, it's because of DefaultRequestContext! :( | |
202 // We need to kill off all URLFetchers using profile related | |
203 // URLRequestContexts. Normally that'd be covered by deleting the Profiles, | |
204 // but we have some URLFetchers using the DefaultRequestContext, so they need | |
205 // to be cancelled too. Remove this when DefaultRequestContext goes away. | |
206 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | |
207 base::Bind(&content::URLFetcher::CancelAll)); | |
208 | |
209 // Need to clear profiles (download managers) before the io_thread_. | 200 // Need to clear profiles (download managers) before the io_thread_. |
210 profile_manager_.reset(); | 201 profile_manager_.reset(); |
211 | 202 |
212 // Debugger must be cleaned up before IO thread and NotificationService. | 203 // Debugger must be cleaned up before IO thread and NotificationService. |
213 remote_debugging_server_.reset(); | 204 remote_debugging_server_.reset(); |
214 | 205 |
215 ExtensionTabIdMap::GetInstance()->Shutdown(); | 206 ExtensionTabIdMap::GetInstance()->Shutdown(); |
216 | 207 |
217 // The policy providers managed by |browser_policy_connector_| need to shut | 208 // The policy providers managed by |browser_policy_connector_| need to shut |
218 // down while the IO and FILE threads are still alive. | 209 // down while the IO and FILE threads are still alive. |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 } | 883 } |
893 | 884 |
894 void BrowserProcessImpl::OnAutoupdateTimer() { | 885 void BrowserProcessImpl::OnAutoupdateTimer() { |
895 if (CanAutorestartForUpdate()) { | 886 if (CanAutorestartForUpdate()) { |
896 DLOG(WARNING) << "Detected update. Restarting browser."; | 887 DLOG(WARNING) << "Detected update. Restarting browser."; |
897 RestartBackgroundInstance(); | 888 RestartBackgroundInstance(); |
898 } | 889 } |
899 } | 890 } |
900 | 891 |
901 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 892 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |