Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/browser/sync/profile_sync_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 #include "components/variations/variations_associated_data.h" 38 #include "components/variations/variations_associated_data.h"
39 #include "url/gurl.h" 39 #include "url/gurl.h"
40 40
41 #if defined(ENABLE_EXTENSIONS) 41 #if defined(ENABLE_EXTENSIONS)
42 #include "extensions/browser/extension_system_provider.h" 42 #include "extensions/browser/extension_system_provider.h"
43 #include "extensions/browser/extensions_browser_client.h" 43 #include "extensions/browser/extensions_browser_client.h"
44 #endif 44 #endif
45 45
46 // static 46 // static
47 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() { 47 ProfileSyncServiceFactory* ProfileSyncServiceFactory::GetInstance() {
48 return Singleton<ProfileSyncServiceFactory>::get(); 48 return base::Singleton<ProfileSyncServiceFactory>::get();
49 } 49 }
50 50
51 // static 51 // static
52 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( 52 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile(
53 Profile* profile) { 53 Profile* profile) {
54 if (!ProfileSyncService::IsSyncAllowedByFlag()) 54 if (!ProfileSyncService::IsSyncAllowedByFlag())
55 return NULL; 55 return NULL;
56 56
57 // Disable sync experimentally to measure impact on startup time. Supervised 57 // Disable sync experimentally to measure impact on startup time. Supervised
58 // users are unaffected, since supervised users rely completely on sync. 58 // users are unaffected, since supervised users rely completely on sync.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 pss->factory()->Initialize(pss); 158 pss->factory()->Initialize(pss);
159 pss->factory()->RegisterDataTypes(); 159 pss->factory()->RegisterDataTypes();
160 pss->Initialize(); 160 pss->Initialize();
161 return pss; 161 return pss;
162 } 162 }
163 163
164 // static 164 // static
165 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { 165 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) {
166 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; 166 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL;
167 } 167 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.h ('k') | chrome/browser/sync/sync_error_notifier_factory_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698