| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" | 28 #include "chrome/browser/sync/supervised_user_signin_manager_wrapper.h" |
| 29 #include "chrome/browser/themes/theme_service_factory.h" | 29 #include "chrome/browser/themes/theme_service_factory.h" |
| 30 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 30 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 31 #include "chrome/browser/webdata/web_data_service_factory.h" | 31 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 32 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 32 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 33 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 33 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 34 #include "components/signin/core/browser/signin_manager.h" | 34 #include "components/signin/core/browser/signin_manager.h" |
| 35 #include "url/gurl.h" | 35 #include "url/gurl.h" |
| 36 | 36 |
| 37 #if defined(ENABLE_EXTENSIONS) | 37 #if defined(ENABLE_EXTENSIONS) |
| 38 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac
tory.h" | |
| 39 #include "extensions/browser/extension_system_provider.h" | 38 #include "extensions/browser/extension_system_provider.h" |
| 40 #include "extensions/browser/extensions_browser_client.h" | 39 #include "extensions/browser/extensions_browser_client.h" |
| 41 #endif | 40 #endif |
| 42 | 41 |
| 43 // static | 42 // static |
| 44 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() { | 43 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() { |
| 45 return Singleton<ProfileSyncServiceFactory>::get(); | 44 return Singleton<ProfileSyncServiceFactory>::get(); |
| 46 } | 45 } |
| 47 | 46 |
| 48 // static | 47 // static |
| (...skipping 24 matching lines...) Expand all Loading... |
| 73 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 72 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 74 DependsOn(SigninManagerFactory::GetInstance()); | 73 DependsOn(SigninManagerFactory::GetInstance()); |
| 75 DependsOn(TemplateURLServiceFactory::GetInstance()); | 74 DependsOn(TemplateURLServiceFactory::GetInstance()); |
| 76 #if defined(ENABLE_THEMES) | 75 #if defined(ENABLE_THEMES) |
| 77 DependsOn(ThemeServiceFactory::GetInstance()); | 76 DependsOn(ThemeServiceFactory::GetInstance()); |
| 78 #endif | 77 #endif |
| 79 DependsOn(WebDataServiceFactory::GetInstance()); | 78 DependsOn(WebDataServiceFactory::GetInstance()); |
| 80 #if defined(ENABLE_EXTENSIONS) | 79 #if defined(ENABLE_EXTENSIONS) |
| 81 DependsOn( | 80 DependsOn( |
| 82 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 81 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
| 83 DependsOn(notifier::ChromeNotifierServiceFactory::GetInstance()); | |
| 84 #endif | 82 #endif |
| 85 | 83 |
| 86 // The following have not been converted to KeyedServices yet, | 84 // The following have not been converted to KeyedServices yet, |
| 87 // and for now they are explicitly destroyed after the | 85 // and for now they are explicitly destroyed after the |
| 88 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, | 86 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, |
| 89 // so they will be around when the ProfileSyncService is destroyed. | 87 // so they will be around when the ProfileSyncService is destroyed. |
| 90 | 88 |
| 91 // DependsOn(FaviconServiceFactory::GetInstance()); | 89 // DependsOn(FaviconServiceFactory::GetInstance()); |
| 92 } | 90 } |
| 93 | 91 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 144 |
| 147 pss->factory()->RegisterDataTypes(pss); | 145 pss->factory()->RegisterDataTypes(pss); |
| 148 pss->Initialize(); | 146 pss->Initialize(); |
| 149 return pss; | 147 return pss; |
| 150 } | 148 } |
| 151 | 149 |
| 152 // static | 150 // static |
| 153 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { | 151 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { |
| 154 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; | 152 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; |
| 155 } | 153 } |
| OLD | NEW |