| 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/profiles/profile_dependency_manager.h" | 5 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" | 90 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 #if defined(ENABLE_CONFIGURATION_POLICY) | 93 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 94 #include "chrome/browser/policy/user_policy_signin_service_factory.h" | 94 #include "chrome/browser/policy/user_policy_signin_service_factory.h" |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
| 98 #include "chrome/browser/chromeos/extensions/input_method_api.h" | 98 #include "chrome/browser/chromeos/extensions/input_method_api.h" |
| 99 #include "chrome/browser/chromeos/extensions/media_player_api.h" | 99 #include "chrome/browser/chromeos/extensions/media_player_api.h" |
| 100 #include "chrome/browser/chromeos/extensions/networking_private_event_router_fac
tory.h" |
| 100 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" | 101 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" |
| 101 #if defined(FILE_MANAGER_EXTENSION) | 102 #if defined(FILE_MANAGER_EXTENSION) |
| 102 #include "chrome/browser/chromeos/extensions/file_browser_private_api_factory.h" | 103 #include "chrome/browser/chromeos/extensions/file_browser_private_api_factory.h" |
| 103 #endif | 104 #endif |
| 104 #endif | 105 #endif |
| 105 | 106 |
| 106 #if defined(USE_AURA) | 107 #if defined(USE_AURA) |
| 107 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h" | 108 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h" |
| 108 #endif | 109 #endif |
| 109 | 110 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 ProfileDependencyManager::~ProfileDependencyManager() {} | 224 ProfileDependencyManager::~ProfileDependencyManager() {} |
| 224 | 225 |
| 225 // This method gets the instance of each ServiceFactory. We do this so that | 226 // This method gets the instance of each ServiceFactory. We do this so that |
| 226 // each ServiceFactory initializes itself and registers its dependencies with | 227 // each ServiceFactory initializes itself and registers its dependencies with |
| 227 // the global PreferenceDependencyManager. We need to have a complete | 228 // the global PreferenceDependencyManager. We need to have a complete |
| 228 // dependency graph when we create a profile so we can dispatch the profile | 229 // dependency graph when we create a profile so we can dispatch the profile |
| 229 // creation message to the services that want to create their services at | 230 // creation message to the services that want to create their services at |
| 230 // profile creation time. | 231 // profile creation time. |
| 231 // | 232 // |
| 232 // TODO(erg): This needs to be something else. I don't think putting every | 233 // TODO(erg): This needs to be something else. I don't think putting every |
| 233 // FooServiceFactory here will scale or is desireable long term. | 234 // FooServiceFactory here will scale or is desirable long term. |
| 234 void ProfileDependencyManager::AssertFactoriesBuilt() { | 235 void ProfileDependencyManager::AssertFactoriesBuilt() { |
| 235 if (built_factories_) | 236 if (built_factories_) |
| 236 return; | 237 return; |
| 237 | 238 |
| 238 AboutSigninInternalsFactory::GetInstance(); | 239 AboutSigninInternalsFactory::GetInstance(); |
| 239 | 240 |
| 240 #if defined(ENABLE_BACKGROUND) | 241 #if defined(ENABLE_BACKGROUND) |
| 241 BackgroundContentsServiceFactory::GetInstance(); | 242 BackgroundContentsServiceFactory::GetInstance(); |
| 242 #endif | 243 #endif |
| 243 BookmarkModelFactory::GetInstance(); | 244 BookmarkModelFactory::GetInstance(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 #endif | 308 #endif |
| 308 FindBarStateFactory::GetInstance(); | 309 FindBarStateFactory::GetInstance(); |
| 309 GAIAInfoUpdateServiceFactory::GetInstance(); | 310 GAIAInfoUpdateServiceFactory::GetInstance(); |
| 310 #if defined(USE_AURA) | 311 #if defined(USE_AURA) |
| 311 GesturePrefsObserverFactoryAura::GetInstance(); | 312 GesturePrefsObserverFactoryAura::GetInstance(); |
| 312 #endif | 313 #endif |
| 313 GlobalErrorServiceFactory::GetInstance(); | 314 GlobalErrorServiceFactory::GetInstance(); |
| 314 GoogleURLTrackerFactory::GetInstance(); | 315 GoogleURLTrackerFactory::GetInstance(); |
| 315 HistoryServiceFactory::GetInstance(); | 316 HistoryServiceFactory::GetInstance(); |
| 316 MediaGalleriesPreferencesFactory::GetInstance(); | 317 MediaGalleriesPreferencesFactory::GetInstance(); |
| 318 #if defined(OS_CHROMEOS) |
| 319 chromeos::NetworkingPrivateEventRouterFactory::GetInstance(); |
| 320 #endif |
| 317 NTPResourceCacheFactory::GetInstance(); | 321 NTPResourceCacheFactory::GetInstance(); |
| 318 PasswordStoreFactory::GetInstance(); | 322 PasswordStoreFactory::GetInstance(); |
| 319 PersonalDataManagerFactory::GetInstance(); | 323 PersonalDataManagerFactory::GetInstance(); |
| 320 #if !defined(OS_ANDROID) | 324 #if !defined(OS_ANDROID) |
| 321 PinnedTabServiceFactory::GetInstance(); | 325 PinnedTabServiceFactory::GetInstance(); |
| 322 #endif | 326 #endif |
| 323 #if defined(ENABLE_PLUGINS) | 327 #if defined(ENABLE_PLUGINS) |
| 324 PluginPrefsFactory::GetInstance(); | 328 PluginPrefsFactory::GetInstance(); |
| 325 #endif | 329 #endif |
| 326 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) | 330 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 } | 467 } |
| 464 | 468 |
| 465 result.append("\n /* Toplevel profile */\n"); | 469 result.append("\n /* Toplevel profile */\n"); |
| 466 result.append(" Profile [shape=box];\n"); | 470 result.append(" Profile [shape=box];\n"); |
| 467 | 471 |
| 468 result.append("}\n"); | 472 result.append("}\n"); |
| 469 return result; | 473 return result; |
| 470 } | 474 } |
| 471 | 475 |
| 472 #endif | 476 #endif |
| OLD | NEW |