OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/autocomplete/network_action_predictor_factory.h" |
11 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 12 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
12 #include "chrome/browser/background/background_contents_service_factory.h" | 13 #include "chrome/browser/background/background_contents_service_factory.h" |
13 #include "chrome/browser/content_settings/cookie_settings.h" | 14 #include "chrome/browser/content_settings/cookie_settings.h" |
14 #include "chrome/browser/plugin_prefs_factory.h" | 15 #include "chrome/browser/plugin_prefs_factory.h" |
15 #include "chrome/browser/prerender/prerender_manager_factory.h" | 16 #include "chrome/browser/prerender/prerender_manager_factory.h" |
16 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 17 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
17 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_keyed_service.h" | 19 #include "chrome/browser/profiles/profile_keyed_service.h" |
19 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 20 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
20 #include "chrome/browser/search_engines/template_url_service_factory.h" | 21 #include "chrome/browser/search_engines/template_url_service_factory.h" |
(...skipping 14 matching lines...) Expand all Loading... |
35 // creation message to the services that want to create their services at | 36 // creation message to the services that want to create their services at |
36 // profile creation time. | 37 // profile creation time. |
37 // | 38 // |
38 // TODO(erg): This needs to be something else. I don't think putting every | 39 // TODO(erg): This needs to be something else. I don't think putting every |
39 // FooServiceFactory here will scale or is desireable long term. | 40 // FooServiceFactory here will scale or is desireable long term. |
40 void AssertFactoriesBuilt() { | 41 void AssertFactoriesBuilt() { |
41 if (!g_initialized) { | 42 if (!g_initialized) { |
42 BackgroundContentsServiceFactory::GetInstance(); | 43 BackgroundContentsServiceFactory::GetInstance(); |
43 CloudPrintProxyServiceFactory::GetInstance(); | 44 CloudPrintProxyServiceFactory::GetInstance(); |
44 CookieSettings::Factory::GetInstance(); | 45 CookieSettings::Factory::GetInstance(); |
45 SpeechInputExtensionManager::InitializeFactory(); | 46 NetworkActionPredictorFactory::GetInstance(); |
46 PersonalDataManagerFactory::GetInstance(); | 47 PersonalDataManagerFactory::GetInstance(); |
47 PluginPrefsFactory::GetInstance(); | 48 PluginPrefsFactory::GetInstance(); |
48 prerender::PrerenderManagerFactory::GetInstance(); | 49 prerender::PrerenderManagerFactory::GetInstance(); |
49 SessionServiceFactory::GetInstance(); | 50 SessionServiceFactory::GetInstance(); |
| 51 SpeechInputExtensionManager::InitializeFactory(); |
50 TabRestoreServiceFactory::GetInstance(); | 52 TabRestoreServiceFactory::GetInstance(); |
51 TemplateURLServiceFactory::GetInstance(); | 53 TemplateURLServiceFactory::GetInstance(); |
52 | 54 |
53 g_initialized = true; | 55 g_initialized = true; |
54 } | 56 } |
55 } | 57 } |
56 | 58 |
57 } // namespace | 59 } // namespace |
58 | 60 |
59 void ProfileDependencyManager::AddComponent( | 61 void ProfileDependencyManager::AddComponent( |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 208 } |
207 } | 209 } |
208 | 210 |
209 if (edges.size()) { | 211 if (edges.size()) { |
210 NOTREACHED() << "Dependency graph has a cycle. We are doomed."; | 212 NOTREACHED() << "Dependency graph has a cycle. We are doomed."; |
211 } | 213 } |
212 | 214 |
213 std::reverse(output.begin(), output.end()); | 215 std::reverse(output.begin(), output.end()); |
214 destruction_order_ = output; | 216 destruction_order_ = output; |
215 } | 217 } |
OLD | NEW |