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/extensions/extension_system_factory.h" | 13 #include "chrome/browser/extensions/extension_system_factory.h" |
14 #include "chrome/browser/history/history_service_factory.h" | 14 #include "chrome/browser/history/history_service_factory.h" |
| 15 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
15 #include "chrome/browser/password_manager/password_store_factory.h" | 16 #include "chrome/browser/password_manager/password_store_factory.h" |
16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
18 #include "chrome/browser/search_engines/template_url_service_factory.h" | 19 #include "chrome/browser/search_engines/template_url_service_factory.h" |
19 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 20 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
20 #include "chrome/browser/signin/about_signin_internals_factory.h" | 21 #include "chrome/browser/signin/about_signin_internals_factory.h" |
21 #include "chrome/browser/signin/signin_manager.h" | 22 #include "chrome/browser/signin/signin_manager.h" |
22 #include "chrome/browser/signin/signin_manager_factory.h" | 23 #include "chrome/browser/signin/signin_manager_factory.h" |
23 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" | 24 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" |
24 #include "chrome/browser/sync/profile_sync_service.h" | 25 #include "chrome/browser/sync/profile_sync_service.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 DependsOn(ThemeServiceFactory::GetInstance()); | 58 DependsOn(ThemeServiceFactory::GetInstance()); |
58 #endif | 59 #endif |
59 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 60 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
60 DependsOn(SigninManagerFactory::GetInstance()); | 61 DependsOn(SigninManagerFactory::GetInstance()); |
61 DependsOn(PasswordStoreFactory::GetInstance()); | 62 DependsOn(PasswordStoreFactory::GetInstance()); |
62 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); | 63 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); |
63 DependsOn(WebDataServiceFactory::GetInstance()); | 64 DependsOn(WebDataServiceFactory::GetInstance()); |
64 DependsOn(HistoryServiceFactory::GetInstance()); | 65 DependsOn(HistoryServiceFactory::GetInstance()); |
65 DependsOn(BookmarkModelFactory::GetInstance()); | 66 DependsOn(BookmarkModelFactory::GetInstance()); |
66 DependsOn(AboutSigninInternalsFactory::GetInstance()); | 67 DependsOn(AboutSigninInternalsFactory::GetInstance()); |
| 68 DependsOn(invalidation::InvalidationServiceFactory::GetInstance()); |
67 | 69 |
68 // The following have not been converted to BrowserContextKeyedServices yet, | 70 // The following have not been converted to BrowserContextKeyedServices yet, |
69 // and for now they are explicitly destroyed after the | 71 // and for now they are explicitly destroyed after the |
70 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, | 72 // BrowserContextDependencyManager is told to DestroyBrowserContextServices, |
71 // so they will be around when the ProfileSyncService is destroyed. | 73 // so they will be around when the ProfileSyncService is destroyed. |
72 | 74 |
73 // DependsOn(FaviconServiceFactory::GetInstance()); | 75 // DependsOn(FaviconServiceFactory::GetInstance()); |
74 } | 76 } |
75 | 77 |
76 ProfileSyncServiceFactory::~ProfileSyncServiceFactory() { | 78 ProfileSyncServiceFactory::~ProfileSyncServiceFactory() { |
(...skipping 28 matching lines...) Expand all Loading... |
105 | 107 |
106 pss->factory()->RegisterDataTypes(pss); | 108 pss->factory()->RegisterDataTypes(pss); |
107 pss->Initialize(); | 109 pss->Initialize(); |
108 return pss; | 110 return pss; |
109 } | 111 } |
110 | 112 |
111 // static | 113 // static |
112 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { | 114 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { |
113 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; | 115 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; |
114 } | 116 } |
OLD | NEW |