| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // creation message to the services that want to create their services at | 160 // creation message to the services that want to create their services at |
| 161 // profile creation time. | 161 // profile creation time. |
| 162 // | 162 // |
| 163 // TODO(erg): This needs to be something else. I don't think putting every | 163 // TODO(erg): This needs to be something else. I don't think putting every |
| 164 // FooServiceFactory here will scale or is desireable long term. | 164 // FooServiceFactory here will scale or is desireable long term. |
| 165 void ProfileDependencyManager::AssertFactoriesBuilt() { | 165 void ProfileDependencyManager::AssertFactoriesBuilt() { |
| 166 if (built_factories_) | 166 if (built_factories_) |
| 167 return; | 167 return; |
| 168 | 168 |
| 169 BackgroundContentsServiceFactory::GetInstance(); | 169 BackgroundContentsServiceFactory::GetInstance(); |
| 170 #if !defined(OS_ANDROID) | |
| 171 CloudPrintProxyServiceFactory::GetInstance(); | |
| 172 #endif | |
| 173 CookieSettings::Factory::GetInstance(); | 170 CookieSettings::Factory::GetInstance(); |
| 174 #if defined(ENABLE_NOTIFICATIONS) | |
| 175 DesktopNotificationServiceFactory::GetInstance(); | |
| 176 #endif | |
| 177 DownloadServiceFactory::GetInstance(); | 171 DownloadServiceFactory::GetInstance(); |
| 178 FindBarStateFactory::GetInstance(); | 172 FindBarStateFactory::GetInstance(); |
| 179 GlobalErrorServiceFactory::GetInstance(); | 173 GlobalErrorServiceFactory::GetInstance(); |
| 180 NetworkActionPredictorFactory::GetInstance(); | 174 NetworkActionPredictorFactory::GetInstance(); |
| 181 NTPResourceCacheFactory::GetInstance(); | 175 NTPResourceCacheFactory::GetInstance(); |
| 182 PasswordStoreFactory::GetInstance(); | 176 PasswordStoreFactory::GetInstance(); |
| 183 PersonalDataManagerFactory::GetInstance(); | 177 PersonalDataManagerFactory::GetInstance(); |
| 178 PluginPrefsFactory::GetInstance(); |
| 179 prerender::PrerenderManagerFactory::GetInstance(); |
| 180 ProfileSyncServiceFactory::GetInstance(); |
| 181 SigninManagerFactory::GetInstance(); |
| 182 SpellCheckFactory::GetInstance(); |
| 183 TabRestoreServiceFactory::GetInstance(); |
| 184 TemplateURLFetcherFactory::GetInstance(); |
| 185 TemplateURLServiceFactory::GetInstance(); |
| 186 TokenServiceFactory::GetInstance(); |
| 184 #if !defined(OS_ANDROID) | 187 #if !defined(OS_ANDROID) |
| 188 CloudPrintProxyServiceFactory::GetInstance(); |
| 185 PinnedTabServiceFactory::GetInstance(); | 189 PinnedTabServiceFactory::GetInstance(); |
| 186 #endif | 190 #endif |
| 187 PluginPrefsFactory::GetInstance(); | 191 #if defined(ENABLE_NOTIFICATIONS) |
| 192 DesktopNotificationServiceFactory::GetInstance(); |
| 193 #endif |
| 188 #if defined(ENABLE_PROTECTOR_SERVICE) | 194 #if defined(ENABLE_PROTECTOR_SERVICE) |
| 189 protector::ProtectorServiceFactory::GetInstance(); | 195 protector::ProtectorServiceFactory::GetInstance(); |
| 190 #endif | 196 #endif |
| 191 prerender::PrerenderManagerFactory::GetInstance(); | 197 #if defined(ENABLE_SESSION_SERVICE) |
| 192 ProfileSyncServiceFactory::GetInstance(); | |
| 193 SessionServiceFactory::GetInstance(); | 198 SessionServiceFactory::GetInstance(); |
| 194 SigninManagerFactory::GetInstance(); | 199 #endif |
| 195 #if defined(ENABLE_INPUT_SPEECH) | 200 #if defined(ENABLE_INPUT_SPEECH) |
| 196 SpeechInputExtensionManager::InitializeFactory(); | 201 SpeechInputExtensionManager::InitializeFactory(); |
| 197 #endif | 202 #endif |
| 198 SpellCheckFactory::GetInstance(); | |
| 199 TabRestoreServiceFactory::GetInstance(); | |
| 200 #if defined(ENABLE_THEMES) | 203 #if defined(ENABLE_THEMES) |
| 201 ThemeServiceFactory::GetInstance(); | 204 ThemeServiceFactory::GetInstance(); |
| 202 #endif | 205 #endif |
| 203 TemplateURLFetcherFactory::GetInstance(); | |
| 204 TemplateURLServiceFactory::GetInstance(); | |
| 205 TokenServiceFactory::GetInstance(); | |
| 206 #if defined(ENABLE_WEB_INTENTS) | 206 #if defined(ENABLE_WEB_INTENTS) |
| 207 WebIntentsRegistryFactory::GetInstance(); | 207 WebIntentsRegistryFactory::GetInstance(); |
| 208 #endif | 208 #endif |
| 209 | 209 |
| 210 built_factories_ = true; | 210 built_factories_ = true; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void ProfileDependencyManager::BuildDestructionOrder(Profile* profile) { | 213 void ProfileDependencyManager::BuildDestructionOrder(Profile* profile) { |
| 214 #if !defined(NDEBUG) | 214 #if !defined(NDEBUG) |
| 215 // Whenever we try to build a destruction ordering, we should also dump a | 215 // Whenever we try to build a destruction ordering, we should also dump a |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 313 } |
| 314 | 314 |
| 315 result.append("\n /* Toplevel profile */\n"); | 315 result.append("\n /* Toplevel profile */\n"); |
| 316 result.append(" Profile [shape=box];\n"); | 316 result.append(" Profile [shape=box];\n"); |
| 317 | 317 |
| 318 result.append("}\n"); | 318 result.append("}\n"); |
| 319 return result; | 319 return result; |
| 320 } | 320 } |
| 321 | 321 |
| 322 #endif | 322 #endif |
| OLD | NEW |