| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // The ProfileSyncService depends on various SyncableServices being around | 104 // The ProfileSyncService depends on various SyncableServices being around |
| 105 // when it is shut down. Specify those dependencies here to build the proper | 105 // when it is shut down. Specify those dependencies here to build the proper |
| 106 // destruction order. | 106 // destruction order. |
| 107 DependsOn(AboutSigninInternalsFactory::GetInstance()); | 107 DependsOn(AboutSigninInternalsFactory::GetInstance()); |
| 108 DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); | 108 DependsOn(autofill::PersonalDataManagerFactory::GetInstance()); |
| 109 DependsOn(BookmarkModelFactory::GetInstance()); | 109 DependsOn(BookmarkModelFactory::GetInstance()); |
| 110 DependsOn(ChromeSigninClientFactory::GetInstance()); | 110 DependsOn(ChromeSigninClientFactory::GetInstance()); |
| 111 DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); | 111 DependsOn(GaiaCookieManagerServiceFactory::GetInstance()); |
| 112 #if !defined(OS_ANDROID) | 112 #if !defined(OS_ANDROID) |
| 113 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 113 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
| 114 DependsOn(ThemeServiceFactory::GetInstance()); |
| 114 #endif | 115 #endif |
| 115 DependsOn(HistoryServiceFactory::GetInstance()); | 116 DependsOn(HistoryServiceFactory::GetInstance()); |
| 116 DependsOn(invalidation::ProfileInvalidationProviderFactory::GetInstance()); | 117 DependsOn(invalidation::ProfileInvalidationProviderFactory::GetInstance()); |
| 117 DependsOn(PasswordStoreFactory::GetInstance()); | 118 DependsOn(PasswordStoreFactory::GetInstance()); |
| 118 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 119 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 119 DependsOn(SigninManagerFactory::GetInstance()); | 120 DependsOn(SigninManagerFactory::GetInstance()); |
| 120 DependsOn(TemplateURLServiceFactory::GetInstance()); | 121 DependsOn(TemplateURLServiceFactory::GetInstance()); |
| 121 #if defined(ENABLE_THEMES) | |
| 122 DependsOn(ThemeServiceFactory::GetInstance()); | |
| 123 #endif | |
| 124 DependsOn(WebDataServiceFactory::GetInstance()); | 122 DependsOn(WebDataServiceFactory::GetInstance()); |
| 125 #if BUILDFLAG(ENABLE_EXTENSIONS) | 123 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 126 DependsOn( | 124 DependsOn( |
| 127 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 125 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
| 128 #endif | 126 #endif |
| 129 | 127 |
| 130 // The following have not been converted to KeyedServices yet, | 128 // The following have not been converted to KeyedServices yet, |
| 131 // and for now they are explicitly destroyed after the | 129 // and for now they are explicitly destroyed after the |
| 132 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, | 130 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, |
| 133 // so they will be around when the ProfileSyncService is destroyed. | 131 // so they will be around when the ProfileSyncService is destroyed. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 198 |
| 201 // static | 199 // static |
| 202 void ProfileSyncServiceFactory::SetSyncClientFactoryForTest( | 200 void ProfileSyncServiceFactory::SetSyncClientFactoryForTest( |
| 203 SyncClientFactory* client_factory) { | 201 SyncClientFactory* client_factory) { |
| 204 client_factory_ = client_factory; | 202 client_factory_ = client_factory; |
| 205 } | 203 } |
| 206 | 204 |
| 207 // static | 205 // static |
| 208 ProfileSyncServiceFactory::SyncClientFactory* | 206 ProfileSyncServiceFactory::SyncClientFactory* |
| 209 ProfileSyncServiceFactory::client_factory_ = nullptr; | 207 ProfileSyncServiceFactory::client_factory_ = nullptr; |
| OLD | NEW |