Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(979)

Side by Side Diff: chrome/browser/profiles/profile_dependency_manager.cc

Issue 9232011: sync: Make ProfileSyncService a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/autocomplete/network_action_predictor_factory.h" 11 #include "chrome/browser/autocomplete/network_action_predictor_factory.h"
12 #include "chrome/browser/autofill/personal_data_manager_factory.h" 12 #include "chrome/browser/autofill/personal_data_manager_factory.h"
13 #include "chrome/browser/background/background_contents_service_factory.h" 13 #include "chrome/browser/background/background_contents_service_factory.h"
14 #include "chrome/browser/content_settings/cookie_settings.h" 14 #include "chrome/browser/content_settings/cookie_settings.h"
15 #include "chrome/browser/plugin_prefs_factory.h" 15 #include "chrome/browser/plugin_prefs_factory.h"
16 #include "chrome/browser/prerender/prerender_manager_factory.h" 16 #include "chrome/browser/prerender/prerender_manager_factory.h"
17 #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"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_keyed_service.h" 19 #include "chrome/browser/profiles/profile_keyed_service.h"
20 #include "chrome/browser/profiles/profile_keyed_service_factory.h" 20 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
21 #include "chrome/browser/search_engines/template_url_service_factory.h" 21 #include "chrome/browser/search_engines/template_url_service_factory.h"
22 #include "chrome/browser/sessions/session_service_factory.h" 22 #include "chrome/browser/sessions/session_service_factory.h"
23 #include "chrome/browser/sessions/tab_restore_service_factory.h" 23 #include "chrome/browser/sessions/tab_restore_service_factory.h"
24 #include "chrome/browser/speech/speech_input_extension_manager.h" 24 #include "chrome/browser/speech/speech_input_extension_manager.h"
25 #include "chrome/browser/sync/profile_sync_service_factory.h"
25 26
26 class Profile; 27 class Profile;
27 28
28 void ProfileDependencyManager::AddComponent( 29 void ProfileDependencyManager::AddComponent(
29 ProfileKeyedServiceFactory* component) { 30 ProfileKeyedServiceFactory* component) {
30 all_components_.push_back(component); 31 all_components_.push_back(component);
31 destruction_order_.clear(); 32 destruction_order_.clear();
32 } 33 }
33 34
34 void ProfileDependencyManager::RemoveComponent( 35 void ProfileDependencyManager::RemoveComponent(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (built_factories_) 147 if (built_factories_)
147 return; 148 return;
148 149
149 BackgroundContentsServiceFactory::GetInstance(); 150 BackgroundContentsServiceFactory::GetInstance();
150 CloudPrintProxyServiceFactory::GetInstance(); 151 CloudPrintProxyServiceFactory::GetInstance();
151 CookieSettings::Factory::GetInstance(); 152 CookieSettings::Factory::GetInstance();
152 NetworkActionPredictorFactory::GetInstance(); 153 NetworkActionPredictorFactory::GetInstance();
153 PersonalDataManagerFactory::GetInstance(); 154 PersonalDataManagerFactory::GetInstance();
154 PluginPrefsFactory::GetInstance(); 155 PluginPrefsFactory::GetInstance();
155 prerender::PrerenderManagerFactory::GetInstance(); 156 prerender::PrerenderManagerFactory::GetInstance();
157 ProfileSyncServiceFactory::GetInstance();
156 SessionServiceFactory::GetInstance(); 158 SessionServiceFactory::GetInstance();
157 SpeechInputExtensionManager::InitializeFactory(); 159 SpeechInputExtensionManager::InitializeFactory();
158 TabRestoreServiceFactory::GetInstance(); 160 TabRestoreServiceFactory::GetInstance();
159 TemplateURLServiceFactory::GetInstance(); 161 TemplateURLServiceFactory::GetInstance();
160 162
161 built_factories_ = true; 163 built_factories_ = true;
162 } 164 }
163 165
164 void ProfileDependencyManager::BuildDestructionOrder() { 166 void ProfileDependencyManager::BuildDestructionOrder() {
165 // Step 1: Build a set of nodes with no incoming edges. 167 // Step 1: Build a set of nodes with no incoming edges.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 207 }
206 } 208 }
207 209
208 if (edges.size()) { 210 if (edges.size()) {
209 NOTREACHED() << "Dependency graph has a cycle. We are doomed."; 211 NOTREACHED() << "Dependency graph has a cycle. We are doomed.";
210 } 212 }
211 213
212 std::reverse(output.begin(), output.end()); 214 std::reverse(output.begin(), output.end());
213 destruction_order_ = output; 215 destruction_order_ = output;
214 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698