| 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/autofill/personal_data_manager_factory.h" | 9 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 11 #include "chrome/browser/defaults.h" | 11 #include "chrome/browser/defaults.h" |
| 12 #include "chrome/browser/extensions/extension_system_factory.h" | 12 #include "chrome/browser/extensions/extension_system_factory.h" |
| 13 #include "chrome/browser/history/history_service_factory.h" | 13 #include "chrome/browser/history/history_service_factory.h" |
| 14 #include "chrome/browser/password_manager/password_store_factory.h" | 14 #include "chrome/browser/password_manager/password_store_factory.h" |
| 15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/profiles/profile_dependency_manager.h" | 17 #include "chrome/browser/profiles/profile_dependency_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/sessions/tab_restore_service_factory.h" | 19 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 20 #include "chrome/browser/signin/signin_manager.h" | 20 #include "chrome/browser/signin/signin_manager.h" |
| 21 #include "chrome/browser/signin/signin_manager_factory.h" | 21 #include "chrome/browser/signin/signin_manager_factory.h" |
| 22 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" | 22 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" |
| 23 #include "chrome/browser/sync/profile_sync_service.h" | 23 #include "chrome/browser/sync/profile_sync_service.h" |
| 24 #include "chrome/browser/themes/theme_service_factory.h" | 24 #include "chrome/browser/themes/theme_service_factory.h" |
| 25 #include "chrome/browser/ui/global_error_service_factory.h" | 25 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 26 #include "chrome/browser/webdata/web_data_service_factory.h" | 26 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() { | 30 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() { |
| 31 return Singleton<ProfileSyncServiceFactory>::get(); | 31 return Singleton<ProfileSyncServiceFactory>::get(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( | 35 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 pss->factory()->RegisterDataTypes(pss); | 96 pss->factory()->RegisterDataTypes(pss); |
| 97 pss->Initialize(); | 97 pss->Initialize(); |
| 98 return pss; | 98 return pss; |
| 99 } | 99 } |
| 100 | 100 |
| 101 // static | 101 // static |
| 102 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { | 102 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { |
| 103 return GetInstance()->GetServiceForProfile(profile, false) != NULL; | 103 return GetInstance()->GetServiceForProfile(profile, false) != NULL; |
| 104 } | 104 } |
| OLD | NEW |