| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profiles/chrome_browser_main_extra_parts_profiles.h" | 5 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "chrome/browser/themes/theme_service_factory.h" | 63 #include "chrome/browser/themes/theme_service_factory.h" |
| 64 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" | 64 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" |
| 65 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 65 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
| 66 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h" | 66 #include "chrome/browser/ui/find_bar/find_bar_state_factory.h" |
| 67 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 67 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
| 68 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h" | 68 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h" |
| 69 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h" | 69 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h" |
| 70 #include "chrome/browser/undo/bookmark_undo_service_factory.h" | 70 #include "chrome/browser/undo/bookmark_undo_service_factory.h" |
| 71 #include "chrome/browser/web_data_service_factory.h" | 71 #include "chrome/browser/web_data_service_factory.h" |
| 72 #include "chrome/common/features.h" | 72 #include "chrome/common/features.h" |
| 73 #include "extensions/features/features.h" |
| 73 #include "printing/features/features.h" | 74 #include "printing/features/features.h" |
| 74 | 75 |
| 75 #if defined(ENABLE_EXTENSIONS) | 76 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 76 #include "apps/browser_context_keyed_service_factories.h" | 77 #include "apps/browser_context_keyed_service_factories.h" |
| 77 #include "chrome/browser/apps/shortcut_manager_factory.h" | 78 #include "chrome/browser/apps/shortcut_manager_factory.h" |
| 78 #include "chrome/browser/extensions/api/networking_private/networking_private_ui
_delegate_factory_impl.h" | 79 #include "chrome/browser/extensions/api/networking_private/networking_private_ui
_delegate_factory_impl.h" |
| 79 #include "chrome/browser/extensions/api/networking_private/networking_private_ve
rify_delegate_factory_impl.h" | 80 #include "chrome/browser/extensions/api/networking_private/networking_private_ve
rify_delegate_factory_impl.h" |
| 80 #include "chrome/browser/extensions/browser_context_keyed_service_factories.h" | 81 #include "chrome/browser/extensions/browser_context_keyed_service_factories.h" |
| 81 #include "chrome/browser/extensions/extension_management.h" | 82 #include "chrome/browser/extensions/extension_management.h" |
| 82 #include "chrome/browser/search/hotword_service_factory.h" | 83 #include "chrome/browser/search/hotword_service_factory.h" |
| 83 #include "chrome/browser/signin/easy_unlock_service_factory.h" | 84 #include "chrome/browser/signin/easy_unlock_service_factory.h" |
| 84 #include "chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h" | 85 #include "chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h" |
| 85 #include "extensions/browser/api/networking_private/networking_private_delegate_
factory.h" | 86 #include "extensions/browser/api/networking_private/networking_private_delegate_
factory.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // dependency graph when we create a profile so we can dispatch the profile | 168 // dependency graph when we create a profile so we can dispatch the profile |
| 168 // creation message to the services that want to create their services at | 169 // creation message to the services that want to create their services at |
| 169 // profile creation time. | 170 // profile creation time. |
| 170 // | 171 // |
| 171 // TODO(erg): This needs to be something else. I don't think putting every | 172 // TODO(erg): This needs to be something else. I don't think putting every |
| 172 // FooServiceFactory here will scale or is desirable long term. | 173 // FooServiceFactory here will scale or is desirable long term. |
| 173 // | 174 // |
| 174 // static | 175 // static |
| 175 void ChromeBrowserMainExtraPartsProfiles:: | 176 void ChromeBrowserMainExtraPartsProfiles:: |
| 176 EnsureBrowserContextKeyedServiceFactoriesBuilt() { | 177 EnsureBrowserContextKeyedServiceFactoriesBuilt() { |
| 177 #if defined(ENABLE_EXTENSIONS) | 178 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 178 apps::EnsureBrowserContextKeyedServiceFactoriesBuilt(); | 179 apps::EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 179 extensions::EnsureBrowserContextKeyedServiceFactoriesBuilt(); | 180 extensions::EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 180 extensions::ExtensionManagementFactory::GetInstance(); | 181 extensions::ExtensionManagementFactory::GetInstance(); |
| 181 chrome_extensions::EnsureBrowserContextKeyedServiceFactoriesBuilt(); | 182 chrome_extensions::EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 182 AppShortcutManagerFactory::GetInstance(); | 183 AppShortcutManagerFactory::GetInstance(); |
| 183 #endif | 184 #endif |
| 184 | 185 |
| 185 #if BUILDFLAG(ENABLE_APP_LIST) | 186 #if BUILDFLAG(ENABLE_APP_LIST) |
| 186 app_list::AppListSyncableServiceFactory::GetInstance(); | 187 app_list::AppListSyncableServiceFactory::GetInstance(); |
| 187 #endif | 188 #endif |
| (...skipping 17 matching lines...) Expand all Loading... |
| 205 #endif | 206 #endif |
| 206 UINetworkQualityEstimatorServiceFactory::GetInstance(); | 207 UINetworkQualityEstimatorServiceFactory::GetInstance(); |
| 207 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 208 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 208 CloudPrintProxyServiceFactory::GetInstance(); | 209 CloudPrintProxyServiceFactory::GetInstance(); |
| 209 #endif | 210 #endif |
| 210 CookieSettingsFactory::GetInstance(); | 211 CookieSettingsFactory::GetInstance(); |
| 211 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 212 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| 212 CrossDevicePromoFactory::GetInstance(); | 213 CrossDevicePromoFactory::GetInstance(); |
| 213 #endif | 214 #endif |
| 214 #if defined(ENABLE_NOTIFICATIONS) | 215 #if defined(ENABLE_NOTIFICATIONS) |
| 215 #if defined(ENABLE_EXTENSIONS) | 216 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 216 ExtensionWelcomeNotificationFactory::GetInstance(); | 217 ExtensionWelcomeNotificationFactory::GetInstance(); |
| 217 #endif | 218 #endif |
| 218 NotifierStateTrackerFactory::GetInstance(); | 219 NotifierStateTrackerFactory::GetInstance(); |
| 219 #endif // defined(ENABLE_NOTIFICATIONS) | 220 #endif // defined(ENABLE_NOTIFICATIONS) |
| 220 data_use_measurement::ChromeDataUseAscriberServiceFactory::GetInstance(); | 221 data_use_measurement::ChromeDataUseAscriberServiceFactory::GetInstance(); |
| 221 dom_distiller::DomDistillerServiceFactory::GetInstance(); | 222 dom_distiller::DomDistillerServiceFactory::GetInstance(); |
| 222 domain_reliability::DomainReliabilityServiceFactory::GetInstance(); | 223 domain_reliability::DomainReliabilityServiceFactory::GetInstance(); |
| 223 DownloadServiceFactory::GetInstance(); | 224 DownloadServiceFactory::GetInstance(); |
| 224 #if defined(ENABLE_EXTENSIONS) | 225 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 225 EasyUnlockServiceFactory::GetInstance(); | 226 EasyUnlockServiceFactory::GetInstance(); |
| 226 EnhancedBookmarkKeyServiceFactory::GetInstance(); | 227 EnhancedBookmarkKeyServiceFactory::GetInstance(); |
| 227 #endif | 228 #endif |
| 228 #if defined(OS_CHROMEOS) | 229 #if defined(OS_CHROMEOS) |
| 229 chromeos::PrinterDetectorFactory::GetInstance(); | 230 chromeos::PrinterDetectorFactory::GetInstance(); |
| 230 chromeos::PrinterPrefManagerFactory::GetInstance(); | 231 chromeos::PrinterPrefManagerFactory::GetInstance(); |
| 231 extensions::VerifyTrustAPI::GetFactoryInstance(); | 232 extensions::VerifyTrustAPI::GetFactoryInstance(); |
| 232 #endif | 233 #endif |
| 233 FaviconServiceFactory::GetInstance(); | 234 FaviconServiceFactory::GetInstance(); |
| 234 FindBarStateFactory::GetInstance(); | 235 FindBarStateFactory::GetInstance(); |
| 235 GAIAInfoUpdateServiceFactory::GetInstance(); | 236 GAIAInfoUpdateServiceFactory::GetInstance(); |
| 236 #if !defined(OS_ANDROID) | 237 #if !defined(OS_ANDROID) |
| 237 GlobalErrorServiceFactory::GetInstance(); | 238 GlobalErrorServiceFactory::GetInstance(); |
| 238 #endif | 239 #endif |
| 239 GoogleURLTrackerFactory::GetInstance(); | 240 GoogleURLTrackerFactory::GetInstance(); |
| 240 HistoryServiceFactory::GetInstance(); | 241 HistoryServiceFactory::GetInstance(); |
| 241 #if defined(ENABLE_EXTENSIONS) | 242 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 242 HotwordServiceFactory::GetInstance(); | 243 HotwordServiceFactory::GetInstance(); |
| 243 #endif | 244 #endif |
| 244 HostContentSettingsMapFactory::GetInstance(); | 245 HostContentSettingsMapFactory::GetInstance(); |
| 245 InMemoryURLIndexFactory::GetInstance(); | 246 InMemoryURLIndexFactory::GetInstance(); |
| 246 invalidation::ProfileInvalidationProviderFactory::GetInstance(); | 247 invalidation::ProfileInvalidationProviderFactory::GetInstance(); |
| 247 InstantServiceFactory::GetInstance(); | 248 InstantServiceFactory::GetInstance(); |
| 248 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 249 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
| 249 cloud_print::PrivetNotificationServiceFactory::GetInstance(); | 250 cloud_print::PrivetNotificationServiceFactory::GetInstance(); |
| 250 #endif | 251 #endif |
| 251 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 252 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 252 #if defined(OS_CHROMEOS) | 253 #if defined(OS_CHROMEOS) |
| 253 chromeos::SupervisedUserPasswordServiceFactory::GetInstance(); | 254 chromeos::SupervisedUserPasswordServiceFactory::GetInstance(); |
| 254 chromeos::ManagerPasswordServiceFactory::GetInstance(); | 255 chromeos::ManagerPasswordServiceFactory::GetInstance(); |
| 255 #endif | 256 #endif |
| 256 SupervisedUserServiceFactory::GetInstance(); | 257 SupervisedUserServiceFactory::GetInstance(); |
| 257 #if !defined(OS_ANDROID) | 258 #if !defined(OS_ANDROID) |
| 258 SupervisedUserSyncServiceFactory::GetInstance(); | 259 SupervisedUserSyncServiceFactory::GetInstance(); |
| 259 #endif | 260 #endif |
| 260 #endif | 261 #endif |
| 261 #if defined(ENABLE_EXTENSIONS) | 262 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 262 #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_MACOSX) | 263 #if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_MACOSX) |
| 263 std::unique_ptr<extensions::NetworkingPrivateVerifyDelegateFactoryImpl> | 264 std::unique_ptr<extensions::NetworkingPrivateVerifyDelegateFactoryImpl> |
| 264 networking_private_verify_delegate_factory( | 265 networking_private_verify_delegate_factory( |
| 265 new extensions::NetworkingPrivateVerifyDelegateFactoryImpl); | 266 new extensions::NetworkingPrivateVerifyDelegateFactoryImpl); |
| 266 extensions::NetworkingPrivateDelegateFactory::GetInstance() | 267 extensions::NetworkingPrivateDelegateFactory::GetInstance() |
| 267 ->SetVerifyDelegateFactory( | 268 ->SetVerifyDelegateFactory( |
| 268 std::move(networking_private_verify_delegate_factory)); | 269 std::move(networking_private_verify_delegate_factory)); |
| 269 std::unique_ptr<extensions::NetworkingPrivateUIDelegateFactoryImpl> | 270 std::unique_ptr<extensions::NetworkingPrivateUIDelegateFactoryImpl> |
| 270 networking_private_ui_delegate_factory( | 271 networking_private_ui_delegate_factory( |
| 271 new extensions::NetworkingPrivateUIDelegateFactoryImpl); | 272 new extensions::NetworkingPrivateUIDelegateFactoryImpl); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 #endif | 342 #endif |
| 342 #if !defined(OS_ANDROID) | 343 #if !defined(OS_ANDROID) |
| 343 UsbChooserContextFactory::GetInstance(); | 344 UsbChooserContextFactory::GetInstance(); |
| 344 #endif | 345 #endif |
| 345 WebDataServiceFactory::GetInstance(); | 346 WebDataServiceFactory::GetInstance(); |
| 346 } | 347 } |
| 347 | 348 |
| 348 void ChromeBrowserMainExtraPartsProfiles::PreProfileInit() { | 349 void ChromeBrowserMainExtraPartsProfiles::PreProfileInit() { |
| 349 EnsureBrowserContextKeyedServiceFactoriesBuilt(); | 350 EnsureBrowserContextKeyedServiceFactoriesBuilt(); |
| 350 } | 351 } |
| OLD | NEW |