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

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

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix small things based on feedback Created 7 years, 7 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/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // first-run autoimport wrote them and reloaded the pref service. 144 // first-run autoimport wrote them and reloaded the pref service.
145 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile 145 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile
146 // import code) is fixed. 146 // import code) is fixed.
147 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() == 147 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() ==
148 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE || 148 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE ||
149 first_run::DidPerformProfileImport(NULL); 149 first_run::DidPerformProfileImport(NULL);
150 } 150 }
151 151
152 bool Profile::IsSyncAccessible() { 152 bool Profile::IsSyncAccessible() {
153 browser_sync::SyncPrefs prefs(GetPrefs()); 153 browser_sync::SyncPrefs prefs(GetPrefs());
154 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); 154 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged() &&
155 !prefs.IsSyncDisabledByAdmin();
Andrew T Wilson (Slow) 2013/05/14 12:34:01 Agreed with Tim that it's too bad that we have so
155 } 156 }
156 157
157 void Profile::MaybeSendDestroyedNotification() { 158 void Profile::MaybeSendDestroyedNotification() {
158 if (!sent_destroyed_notification_) { 159 if (!sent_destroyed_notification_) {
159 sent_destroyed_notification_ = true; 160 sent_destroyed_notification_ = true;
160 content::NotificationService::current()->Notify( 161 content::NotificationService::current()->Notify(
161 chrome::NOTIFICATION_PROFILE_DESTROYED, 162 chrome::NOTIFICATION_PROFILE_DESTROYED,
162 content::Source<Profile>(this), 163 content::Source<Profile>(this),
163 content::NotificationService::NoDetails()); 164 content::NotificationService::NoDetails());
164 } 165 }
165 } 166 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options.js » ('j') | chrome/browser/sync/profile_sync_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698