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/sync/profile_sync_service_factory.h" | 5 #include "chrome/browser/sync/profile_sync_service_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
12 #include "chrome/browser/defaults.h" | 12 #include "chrome/browser/defaults.h" |
13 #include "chrome/browser/history/history_service_factory.h" | 13 #include "chrome/browser/history/history_service_factory.h" |
14 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
15 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
18 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
19 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" | 19 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
20 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 20 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
21 #include "chrome/browser/signin/about_signin_internals_factory.h" | 21 #include "chrome/browser/signin/about_signin_internals_factory.h" |
22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
23 #include "chrome/browser/signin/signin_manager_factory.h" | 23 #include "chrome/browser/signin/signin_manager_factory.h" |
24 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" | 24 #include "chrome/browser/sync/managed_user_signin_manager_wrapper.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // The ProfileSyncService depends on various SyncableServices being around | 58 // The ProfileSyncService depends on various SyncableServices being around |
59 // when it is shut down. Specify those dependencies here to build the proper | 59 // when it is shut down. Specify those dependencies here to build the proper |
60 // destruction order. | 60 // destruction order. |
61 DependsOn(AboutSigninInternalsFactory::GetInstance()); | 61 DependsOn(AboutSigninInternalsFactory::GetInstance()); |
62 DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); | 62 DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); |
63 DependsOn(BookmarkModelFactory::GetInstance()); | 63 DependsOn(BookmarkModelFactory::GetInstance()); |
64 DependsOn( | 64 DependsOn( |
65 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 65 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
66 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 66 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
67 DependsOn(HistoryServiceFactory::GetInstance()); | 67 DependsOn(HistoryServiceFactory::GetInstance()); |
68 DependsOn(invalidation::InvalidationServiceFactory::GetInstance()); | 68 DependsOn(invalidation::ProfileInvalidationProviderFactory::GetInstance()); |
69 DependsOn(PasswordStoreFactory::GetInstance()); | 69 DependsOn(PasswordStoreFactory::GetInstance()); |
70 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 70 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
71 DependsOn(SigninManagerFactory::GetInstance()); | 71 DependsOn(SigninManagerFactory::GetInstance()); |
72 DependsOn(TemplateURLServiceFactory::GetInstance()); | 72 DependsOn(TemplateURLServiceFactory::GetInstance()); |
73 #if defined(ENABLE_THEMES) | 73 #if defined(ENABLE_THEMES) |
74 DependsOn(ThemeServiceFactory::GetInstance()); | 74 DependsOn(ThemeServiceFactory::GetInstance()); |
75 #endif | 75 #endif |
76 DependsOn(WebDataServiceFactory::GetInstance()); | 76 DependsOn(WebDataServiceFactory::GetInstance()); |
77 | 77 |
78 // The following have not been converted to KeyedServices yet, | 78 // The following have not been converted to KeyedServices yet, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 pss->factory()->RegisterDataTypes(pss); | 121 pss->factory()->RegisterDataTypes(pss); |
122 pss->Initialize(); | 122 pss->Initialize(); |
123 return pss; | 123 return pss; |
124 } | 124 } |
125 | 125 |
126 // static | 126 // static |
127 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { | 127 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { |
128 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; | 128 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; |
129 } | 129 } |
OLD | NEW |