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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "chrome/browser/printing/print_job_manager.h" | 56 #include "chrome/browser/printing/print_job_manager.h" |
57 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 57 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
58 #include "chrome/browser/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
59 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 59 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
60 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 60 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
61 #include "chrome/browser/shell_integration.h" | 61 #include "chrome/browser/shell_integration.h" |
62 #include "chrome/browser/status_icons/status_tray.h" | 62 #include "chrome/browser/status_icons/status_tray.h" |
63 #include "chrome/browser/ui/apps/chrome_app_window_client.h" | 63 #include "chrome/browser/ui/apps/chrome_app_window_client.h" |
64 #include "chrome/browser/ui/browser_dialogs.h" | 64 #include "chrome/browser/ui/browser_dialogs.h" |
65 #include "chrome/browser/ui/browser_finder.h" | 65 #include "chrome/browser/ui/browser_finder.h" |
| 66 #include "chrome/browser/ui/user_manager.h" |
66 #include "chrome/browser/web_resource/promo_resource_service.h" | 67 #include "chrome/browser/web_resource/promo_resource_service.h" |
67 #include "chrome/common/chrome_constants.h" | 68 #include "chrome/common/chrome_constants.h" |
68 #include "chrome/common/chrome_paths.h" | 69 #include "chrome/common/chrome_paths.h" |
69 #include "chrome/common/chrome_switches.h" | 70 #include "chrome/common/chrome_switches.h" |
70 #include "chrome/common/extensions/chrome_extensions_client.h" | 71 #include "chrome/common/extensions/chrome_extensions_client.h" |
71 #include "chrome/common/pref_names.h" | 72 #include "chrome/common/pref_names.h" |
72 #include "chrome/common/switch_utils.h" | 73 #include "chrome/common/switch_utils.h" |
73 #include "chrome/common/url_constants.h" | 74 #include "chrome/common/url_constants.h" |
74 #include "chrome/installer/util/google_update_constants.h" | 75 #include "chrome/installer/util/google_update_constants.h" |
75 #include "chrome/installer/util/google_update_settings.h" | 76 #include "chrome/installer/util/google_update_settings.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // those things during teardown. | 249 // those things during teardown. |
249 notification_ui_manager_.reset(); | 250 notification_ui_manager_.reset(); |
250 | 251 |
251 // Need to clear profiles (download managers) before the io_thread_. | 252 // Need to clear profiles (download managers) before the io_thread_. |
252 { | 253 { |
253 TRACE_EVENT0("shutdown", | 254 TRACE_EVENT0("shutdown", |
254 "BrowserProcessImpl::StartTearDown:ProfileManager"); | 255 "BrowserProcessImpl::StartTearDown:ProfileManager"); |
255 // The desktop User Manager needs to be closed before the guest profile | 256 // The desktop User Manager needs to be closed before the guest profile |
256 // can be destroyed. | 257 // can be destroyed. |
257 if (switches::IsNewAvatarMenu()) | 258 if (switches::IsNewAvatarMenu()) |
258 chrome::HideUserManager(); | 259 UserManager::Hide(); |
259 profile_manager_.reset(); | 260 profile_manager_.reset(); |
260 } | 261 } |
261 | 262 |
262 #if !defined(OS_ANDROID) | 263 #if !defined(OS_ANDROID) |
263 // Debugger must be cleaned up before IO thread and NotificationService. | 264 // Debugger must be cleaned up before IO thread and NotificationService. |
264 remote_debugging_server_.reset(); | 265 remote_debugging_server_.reset(); |
265 #endif | 266 #endif |
266 | 267 |
267 #if defined(ENABLE_EXTENSIONS) | 268 #if defined(ENABLE_EXTENSIONS) |
268 ExtensionRendererState::GetInstance()->Shutdown(); | 269 ExtensionRendererState::GetInstance()->Shutdown(); |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 } | 1220 } |
1220 | 1221 |
1221 void BrowserProcessImpl::OnAutoupdateTimer() { | 1222 void BrowserProcessImpl::OnAutoupdateTimer() { |
1222 if (CanAutorestartForUpdate()) { | 1223 if (CanAutorestartForUpdate()) { |
1223 DLOG(WARNING) << "Detected update. Restarting browser."; | 1224 DLOG(WARNING) << "Detected update. Restarting browser."; |
1224 RestartBackgroundInstance(); | 1225 RestartBackgroundInstance(); |
1225 } | 1226 } |
1226 } | 1227 } |
1227 | 1228 |
1228 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1229 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |