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 |
11 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 11 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
12 #include "chrome/browser/background/background_contents_service_factory.h" | 12 #include "chrome/browser/background/background_contents_service_factory.h" |
13 #include "chrome/browser/content_settings/cookie_settings.h" | 13 #include "chrome/browser/content_settings/cookie_settings.h" |
14 #include "chrome/browser/download/download_service_factory.h" | 14 #include "chrome/browser/download/download_service_factory.h" |
15 #include "chrome/browser/extensions/api/commands/extension_command_service_facto
ry.h" | 15 #include "chrome/browser/extensions/api/commands/extension_command_service_facto
ry.h" |
16 #include "chrome/browser/extensions/extension_system_factory.h" | 16 #include "chrome/browser/extensions/extension_system_factory.h" |
17 #include "chrome/browser/google/google_url_tracker_factory.h" | 17 #include "chrome/browser/google/google_url_tracker_factory.h" |
18 #include "chrome/browser/intents/web_intents_registry_factory.h" | 18 #include "chrome/browser/intents/web_intents_registry_factory.h" |
19 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 19 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
20 #include "chrome/browser/password_manager/password_store_factory.h" | 20 #include "chrome/browser/password_manager/password_store_factory.h" |
21 #include "chrome/browser/plugin_prefs_factory.h" | 21 #include "chrome/browser/plugin_prefs_factory.h" |
22 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" | 22 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" |
| 23 #include "chrome/browser/predictors/predictor_database_factory.h" |
23 #include "chrome/browser/prerender/prerender_manager_factory.h" | 24 #include "chrome/browser/prerender/prerender_manager_factory.h" |
24 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 25 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
25 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/profiles/profile_keyed_service.h" | 27 #include "chrome/browser/profiles/profile_keyed_service.h" |
27 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 28 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
28 #include "chrome/browser/protector/protector_service_factory.h" | 29 #include "chrome/browser/protector/protector_service_factory.h" |
29 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" | 30 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" |
30 #include "chrome/browser/search_engines/template_url_service_factory.h" | 31 #include "chrome/browser/search_engines/template_url_service_factory.h" |
31 #include "chrome/browser/sessions/session_service_factory.h" | 32 #include "chrome/browser/sessions/session_service_factory.h" |
32 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 33 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // dependency graph when we create a profile so we can dispatch the profile | 169 // dependency graph when we create a profile so we can dispatch the profile |
169 // creation message to the services that want to create their services at | 170 // creation message to the services that want to create their services at |
170 // profile creation time. | 171 // profile creation time. |
171 // | 172 // |
172 // TODO(erg): This needs to be something else. I don't think putting every | 173 // TODO(erg): This needs to be something else. I don't think putting every |
173 // FooServiceFactory here will scale or is desireable long term. | 174 // FooServiceFactory here will scale or is desireable long term. |
174 void ProfileDependencyManager::AssertFactoriesBuilt() { | 175 void ProfileDependencyManager::AssertFactoriesBuilt() { |
175 if (built_factories_) | 176 if (built_factories_) |
176 return; | 177 return; |
177 | 178 |
178 AutocompleteActionPredictorFactory::GetInstance(); | |
179 #if defined(ENABLE_BACKGROUND) | 179 #if defined(ENABLE_BACKGROUND) |
180 BackgroundContentsServiceFactory::GetInstance(); | 180 BackgroundContentsServiceFactory::GetInstance(); |
181 #endif | 181 #endif |
182 ChromeURLDataManagerFactory::GetInstance(); | 182 ChromeURLDataManagerFactory::GetInstance(); |
183 #if !defined(OS_ANDROID) | 183 #if !defined(OS_ANDROID) |
184 CloudPrintProxyServiceFactory::GetInstance(); | 184 CloudPrintProxyServiceFactory::GetInstance(); |
185 #endif | 185 #endif |
186 CookieSettings::Factory::GetInstance(); | 186 CookieSettings::Factory::GetInstance(); |
187 #if defined(ENABLE_NOTIFICATIONS) | 187 #if defined(ENABLE_NOTIFICATIONS) |
188 DesktopNotificationServiceFactory::GetInstance(); | 188 DesktopNotificationServiceFactory::GetInstance(); |
189 #endif | 189 #endif |
190 DownloadServiceFactory::GetInstance(); | 190 DownloadServiceFactory::GetInstance(); |
191 ExtensionCommandServiceFactory::GetInstance(); | 191 ExtensionCommandServiceFactory::GetInstance(); |
192 ExtensionSystemFactory::GetInstance(); | 192 ExtensionSystemFactory::GetInstance(); |
193 FindBarStateFactory::GetInstance(); | 193 FindBarStateFactory::GetInstance(); |
194 #if defined(USE_AURA) | 194 #if defined(USE_AURA) |
195 GesturePrefsObserverFactoryAura::GetInstance(); | 195 GesturePrefsObserverFactoryAura::GetInstance(); |
196 #endif | 196 #endif |
197 GlobalErrorServiceFactory::GetInstance(); | 197 GlobalErrorServiceFactory::GetInstance(); |
198 GoogleURLTrackerFactory::GetInstance(); | 198 GoogleURLTrackerFactory::GetInstance(); |
199 NTPResourceCacheFactory::GetInstance(); | 199 NTPResourceCacheFactory::GetInstance(); |
200 PasswordStoreFactory::GetInstance(); | 200 PasswordStoreFactory::GetInstance(); |
201 PersonalDataManagerFactory::GetInstance(); | 201 PersonalDataManagerFactory::GetInstance(); |
202 #if !defined(OS_ANDROID) | 202 #if !defined(OS_ANDROID) |
203 PinnedTabServiceFactory::GetInstance(); | 203 PinnedTabServiceFactory::GetInstance(); |
204 #endif | 204 #endif |
205 PluginPrefsFactory::GetInstance(); | 205 PluginPrefsFactory::GetInstance(); |
| 206 predictors::AutocompleteActionPredictorFactory::GetInstance(); |
| 207 predictors::PredictorDatabaseFactory::GetInstance(); |
206 prerender::PrerenderManagerFactory::GetInstance(); | 208 prerender::PrerenderManagerFactory::GetInstance(); |
207 ProfileSyncServiceFactory::GetInstance(); | 209 ProfileSyncServiceFactory::GetInstance(); |
208 #if defined(ENABLE_PROTECTOR_SERVICE) | 210 #if defined(ENABLE_PROTECTOR_SERVICE) |
209 protector::ProtectorServiceFactory::GetInstance(); | 211 protector::ProtectorServiceFactory::GetInstance(); |
210 #endif | 212 #endif |
211 #if defined(ENABLE_SESSION_SERVICE) | 213 #if defined(ENABLE_SESSION_SERVICE) |
212 SessionServiceFactory::GetInstance(); | 214 SessionServiceFactory::GetInstance(); |
213 #endif | 215 #endif |
214 SigninManagerFactory::GetInstance(); | 216 SigninManagerFactory::GetInstance(); |
215 #if defined(ENABLE_INPUT_SPEECH) | 217 #if defined(ENABLE_INPUT_SPEECH) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } | 336 } |
335 | 337 |
336 result.append("\n /* Toplevel profile */\n"); | 338 result.append("\n /* Toplevel profile */\n"); |
337 result.append(" Profile [shape=box];\n"); | 339 result.append(" Profile [shape=box];\n"); |
338 | 340 |
339 result.append("}\n"); | 341 result.append("}\n"); |
340 return result; | 342 return result; |
341 } | 343 } |
342 | 344 |
343 #endif | 345 #endif |
OLD | NEW |