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

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

Issue 10956034: Switching from ForXyz naming to FromXyz naming, for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 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 | Annotate | Revision Log
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 "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"
(...skipping 24 matching lines...) Expand all
35 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile( 35 ProfileSyncService* ProfileSyncServiceFactory::GetForProfile(
36 Profile* profile) { 36 Profile* profile) {
37 if (!ProfileSyncService::IsSyncEnabled()) 37 if (!ProfileSyncService::IsSyncEnabled())
38 return NULL; 38 return NULL;
39 39
40 return static_cast<ProfileSyncService*>( 40 return static_cast<ProfileSyncService*>(
41 GetInstance()->GetServiceForProfile(profile, true)); 41 GetInstance()->GetServiceForProfile(profile, true));
42 } 42 }
43 43
44 // static 44 // static
45 ProfileSyncServiceBase* ProfileSyncServiceBase::ForContext( 45 ProfileSyncServiceBase* ProfileSyncServiceBase::FromBrowserContext(
46 content::BrowserContext* context) { 46 content::BrowserContext* context) {
47 return ProfileSyncServiceFactory::GetForProfile( 47 return ProfileSyncServiceFactory::GetForProfile(
48 static_cast<Profile*>(context)); 48 static_cast<Profile*>(context));
49 } 49 }
50 50
51 ProfileSyncServiceFactory::ProfileSyncServiceFactory() 51 ProfileSyncServiceFactory::ProfileSyncServiceFactory()
52 : ProfileKeyedServiceFactory("ProfileSyncService", 52 : ProfileKeyedServiceFactory("ProfileSyncService",
53 ProfileDependencyManager::GetInstance()) { 53 ProfileDependencyManager::GetInstance()) {
54 54
55 // The ProfileSyncService depends on various SyncableServices being around 55 // The ProfileSyncService depends on various SyncableServices being around
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 pss->factory()->RegisterDataTypes(pss); 103 pss->factory()->RegisterDataTypes(pss);
104 pss->Initialize(); 104 pss->Initialize();
105 return pss; 105 return pss;
106 } 106 }
107 107
108 // static 108 // static
109 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { 109 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) {
110 return GetInstance()->GetServiceForProfile(profile, false) != NULL; 110 return GetInstance()->GetServiceForProfile(profile, false) != NULL;
111 } 111 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service.cc ('k') | chrome/browser/ui/webui/options/preferences_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698