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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 } | 1132 } |
1133 | 1133 |
1134 void BrowserProcessImpl::CreateIntranetRedirectDetector() { | 1134 void BrowserProcessImpl::CreateIntranetRedirectDetector() { |
1135 DCHECK(!intranet_redirect_detector_); | 1135 DCHECK(!intranet_redirect_detector_); |
1136 std::unique_ptr<IntranetRedirectDetector> intranet_redirect_detector( | 1136 std::unique_ptr<IntranetRedirectDetector> intranet_redirect_detector( |
1137 new IntranetRedirectDetector); | 1137 new IntranetRedirectDetector); |
1138 intranet_redirect_detector_.swap(intranet_redirect_detector); | 1138 intranet_redirect_detector_.swap(intranet_redirect_detector); |
1139 } | 1139 } |
1140 | 1140 |
1141 void BrowserProcessImpl::CreateNotificationPlatformBridge() { | 1141 void BrowserProcessImpl::CreateNotificationPlatformBridge() { |
1142 #if (defined(OS_ANDROID) || defined(OS_MACOSX)) && defined(ENABLE_NOTIFICATIONS) | 1142 #if (defined(OS_ANDROID) || defined(OS_MACOSX)) |
1143 DCHECK(!notification_bridge_); | 1143 DCHECK(!notification_bridge_); |
1144 notification_bridge_.reset(NotificationPlatformBridge::Create()); | 1144 notification_bridge_.reset(NotificationPlatformBridge::Create()); |
1145 created_notification_bridge_ = true; | 1145 created_notification_bridge_ = true; |
1146 #endif | 1146 #endif |
1147 } | 1147 } |
1148 | 1148 |
1149 void BrowserProcessImpl::CreateNotificationUIManager() { | 1149 void BrowserProcessImpl::CreateNotificationUIManager() { |
1150 // Android does not use the NotificationUIManager anymore | 1150 // Android does not use the NotificationUIManager anymore |
1151 // All notification traffic is routed through NotificationPlatformBridge. | 1151 // All notification traffic is routed through NotificationPlatformBridge. |
1152 #if defined(ENABLE_NOTIFICATIONS) && !defined(OS_ANDROID) | 1152 #if !defined(OS_ANDROID) |
1153 DCHECK(!notification_ui_manager_); | 1153 DCHECK(!notification_ui_manager_); |
1154 notification_ui_manager_.reset(NotificationUIManager::Create()); | 1154 notification_ui_manager_.reset(NotificationUIManager::Create()); |
1155 created_notification_ui_manager_ = true; | 1155 created_notification_ui_manager_ = true; |
1156 #endif | 1156 #endif |
1157 } | 1157 } |
1158 | 1158 |
1159 void BrowserProcessImpl::CreateBackgroundModeManager() { | 1159 void BrowserProcessImpl::CreateBackgroundModeManager() { |
1160 #if BUILDFLAG(ENABLE_BACKGROUND) | 1160 #if BUILDFLAG(ENABLE_BACKGROUND) |
1161 DCHECK(!background_mode_manager_); | 1161 DCHECK(!background_mode_manager_); |
1162 background_mode_manager_.reset( | 1162 background_mode_manager_.reset( |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 } | 1411 } |
1412 | 1412 |
1413 void BrowserProcessImpl::OnAutoupdateTimer() { | 1413 void BrowserProcessImpl::OnAutoupdateTimer() { |
1414 if (CanAutorestartForUpdate()) { | 1414 if (CanAutorestartForUpdate()) { |
1415 DLOG(WARNING) << "Detected update. Restarting browser."; | 1415 DLOG(WARNING) << "Detected update. Restarting browser."; |
1416 RestartBackgroundInstance(); | 1416 RestartBackgroundInstance(); |
1417 } | 1417 } |
1418 } | 1418 } |
1419 | 1419 |
1420 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1420 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |