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 "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 ProfileSyncServiceFactory::ProfileSyncServiceFactory() | 39 ProfileSyncServiceFactory::ProfileSyncServiceFactory() |
40 : ProfileKeyedServiceFactory("ProfileSyncService", | 40 : ProfileKeyedServiceFactory("ProfileSyncService", |
41 ProfileDependencyManager::GetInstance()) { | 41 ProfileDependencyManager::GetInstance()) { |
42 | 42 |
43 // The ProfileSyncService depends on various SyncableServices being around | 43 // The ProfileSyncService depends on various SyncableServices being around |
44 // when it is shut down. Specify those dependencies here to build the proper | 44 // when it is shut down. Specify those dependencies here to build the proper |
45 // destruction order. | 45 // destruction order. |
46 DependsOn(TemplateURLServiceFactory::GetInstance()); | 46 DependsOn(TemplateURLServiceFactory::GetInstance()); |
47 DependsOn(PersonalDataManagerFactory::GetInstance()); | 47 DependsOn(PersonalDataManagerFactory::GetInstance()); |
48 #if !defined(OS_ANDROID) | |
Elliot Glaysher
2012/03/02 00:23:05
Is this enough? I thought that there was additiona
Ted C
2012/03/08 19:42:08
This removed the only link errors I was seeing, bu
| |
48 DependsOn(ThemeServiceFactory::GetInstance()); | 49 DependsOn(ThemeServiceFactory::GetInstance()); |
50 #endif | |
49 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 51 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
50 DependsOn(SigninManagerFactory::GetInstance()); | 52 DependsOn(SigninManagerFactory::GetInstance()); |
51 | 53 |
52 // The following have not been converted to ProfileKeyedServices yet, and for | 54 // The following have not been converted to ProfileKeyedServices yet, and for |
53 // now they are explicitly destroyed after the ProfileDependencyManager is | 55 // now they are explicitly destroyed after the ProfileDependencyManager is |
54 // told to DestroyProfileServices, so they will be around when the | 56 // told to DestroyProfileServices, so they will be around when the |
55 // ProfileSyncService is destroyed. | 57 // ProfileSyncService is destroyed. |
56 | 58 |
57 // DependsOn(WebDataServiceFactory::GetInstance()); | 59 // DependsOn(WebDataServiceFactory::GetInstance()); |
58 // DependsOn(HistoryServiceFactory::GetInstance()); | 60 // DependsOn(HistoryServiceFactory::GetInstance()); |
(...skipping 29 matching lines...) Expand all Loading... | |
88 | 90 |
89 pss->factory()->RegisterDataTypes(pss); | 91 pss->factory()->RegisterDataTypes(pss); |
90 pss->Initialize(); | 92 pss->Initialize(); |
91 return pss; | 93 return pss; |
92 } | 94 } |
93 | 95 |
94 // static | 96 // static |
95 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { | 97 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { |
96 return GetInstance()->GetServiceForProfile(profile, false) != NULL; | 98 return GetInstance()->GetServiceForProfile(profile, false) != NULL; |
97 } | 99 } |
OLD | NEW |