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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE; 206 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE;
207 } 207 }
208 208
209 bool Profile::IsSyncAllowed() { 209 bool Profile::IsSyncAllowed() {
210 if (ProfileSyncServiceFactory::HasProfileSyncService(this)) { 210 if (ProfileSyncServiceFactory::HasProfileSyncService(this)) {
211 return ProfileSyncServiceFactory::GetForProfile(this)->IsSyncAllowed(); 211 return ProfileSyncServiceFactory::GetForProfile(this)->IsSyncAllowed();
212 } 212 }
213 213
214 // No ProfileSyncService created yet - we don't want to create one, so just 214 // No ProfileSyncService created yet - we don't want to create one, so just
215 // infer the accessible state by looking at prefs/command line flags. 215 // infer the accessible state by looking at prefs/command line flags.
216 syncer::SyncPrefs prefs(GetPrefs()); 216 sync_driver::SyncPrefs prefs(GetPrefs());
217 return browser_sync::ProfileSyncService::IsSyncAllowedByFlag() && 217 return browser_sync::ProfileSyncService::IsSyncAllowedByFlag() &&
218 !prefs.IsManaged(); 218 !prefs.IsManaged();
219 } 219 }
220 220
221 void Profile::MaybeSendDestroyedNotification() { 221 void Profile::MaybeSendDestroyedNotification() {
222 if (!sent_destroyed_notification_) { 222 if (!sent_destroyed_notification_) {
223 sent_destroyed_notification_ = true; 223 sent_destroyed_notification_ = true;
224 224
225 NotifyWillBeDestroyed(this); 225 NotifyWillBeDestroyed(this);
226 content::NotificationService::current()->Notify( 226 content::NotificationService::current()->Notify(
227 chrome::NOTIFICATION_PROFILE_DESTROYED, 227 chrome::NOTIFICATION_PROFILE_DESTROYED,
228 content::Source<Profile>(this), 228 content::Source<Profile>(this),
229 content::NotificationService::NoDetails()); 229 content::NotificationService::NoDetails());
230 } 230 }
231 } 231 }
232 232
233 bool ProfileCompare::operator()(Profile* a, Profile* b) const { 233 bool ProfileCompare::operator()(Profile* a, Profile* b) const {
234 DCHECK(a && b); 234 DCHECK(a && b);
235 if (a->IsSameProfile(b)) 235 if (a->IsSameProfile(b))
236 return false; 236 return false;
237 return a->GetOriginalProfile() < b->GetOriginalProfile(); 237 return a->GetOriginalProfile() < b->GetOriginalProfile();
238 } 238 }
239 239
240 double Profile::GetDefaultZoomLevelForProfile() { 240 double Profile::GetDefaultZoomLevelForProfile() {
241 return GetDefaultStoragePartition(this) 241 return GetDefaultStoragePartition(this)
242 ->GetHostZoomMap() 242 ->GetHostZoomMap()
243 ->GetDefaultZoomLevel(); 243 ->GetDefaultZoomLevel();
244 } 244 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698