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/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/extensions/speech_input/extension_speech_input_manager.
h" | 13 #include "chrome/browser/extensions/speech_input/extension_speech_input_manager.
h" |
14 #include "chrome/browser/plugin_prefs_factory.h" | 14 #include "chrome/browser/plugin_prefs_factory.h" |
15 #include "chrome/browser/prerender/prerender_manager_factory.h" | 15 #include "chrome/browser/prerender/prerender_manager_factory.h" |
16 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 16 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_keyed_service.h" | 18 #include "chrome/browser/profiles/profile_keyed_service.h" |
19 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 19 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
20 #include "chrome/browser/search_engines/template_url_service_factory.h" | 20 #include "chrome/browser/search_engines/template_url_service_factory.h" |
21 #include "chrome/browser/sessions/session_service_factory.h" | 21 #include "chrome/browser/sessions/session_service_factory.h" |
22 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 22 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
23 #include "content/common/notification_service.h" | |
24 | 23 |
25 class Profile; | 24 class Profile; |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
29 bool g_initialized = false; | 28 bool g_initialized = false; |
30 | 29 |
31 // This method gets the instance of each ServiceFactory. We do this so that | 30 // This method gets the instance of each ServiceFactory. We do this so that |
32 // each ServiceFactory initializes iteslf and registers its dependencies with | 31 // each ServiceFactory initializes iteslf and registers its dependencies with |
33 // the global PreferenceDependencyManager. We need to have a complete | 32 // the global PreferenceDependencyManager. We need to have a complete |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 204 } |
206 } | 205 } |
207 | 206 |
208 if (edges.size()) { | 207 if (edges.size()) { |
209 NOTREACHED() << "Dependency graph has a cycle. We are doomed."; | 208 NOTREACHED() << "Dependency graph has a cycle. We are doomed."; |
210 } | 209 } |
211 | 210 |
212 std::reverse(output.begin(), output.end()); | 211 std::reverse(output.begin(), output.end()); |
213 destruction_order_ = output; | 212 destruction_order_ = output; |
214 } | 213 } |
OLD | NEW |