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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 219a5e9d649e6280a084c84f59bfe0144eaa5b4b..45190ee1d2252b1e11f719b911e7d30d5a094e99 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -946,8 +946,12 @@ Profile* SyncSetupHandler::GetProfile() const {
ProfileSyncService* SyncSetupHandler::GetSyncService() const {
Profile* profile = GetProfile();
- return profile->IsSyncAccessible() ?
- ProfileSyncServiceFactory::GetForProfile(GetProfile()) : NULL;
+ ProfileSyncService* service = NULL;
+ if (profile->IsSyncAccessible())
+ service = ProfileSyncServiceFactory::GetForProfile(GetProfile());
+ if (service->IsManaged())
+ service = NULL;
+ return service;
}
void SyncSetupHandler::SigninSuccess() {
@@ -1147,8 +1151,8 @@ void SyncSetupHandler::CloseSyncSetup() {
if (IsActiveLogin()) {
// Don't log a cancel event if the sync setup dialog is being
// automatically closed due to an auth error.
- if ((!sync_service || !sync_service->HasSyncSetupCompleted()) &&
- sync_service->GetAuthError().state() == GoogleServiceAuthError::NONE) {
+ if (!sync_service || (!sync_service->HasSyncSetupCompleted() &&
+ sync_service->GetAuthError().state() == GoogleServiceAuthError::NONE)) {
if (signin_tracker_.get()) {
ProfileSyncService::SyncEvent(
ProfileSyncService::CANCEL_DURING_SIGNON);

Powered by Google App Engine
This is Rietveld 408576698