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

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 14691004: [sync] Separate sign in from sync on Desktop Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/sync/sync_ui_util.cc
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index a8cd618e63474294d89b65926ded4a262712aacf..d0fee786fb67519b636b894bcc65aaba10ebaefe 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -55,8 +55,15 @@ string16 GetSyncedStateStatusLabel(ProfileSyncService* service,
return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_DISABLED,
user_name);
} else if (service->IsStartSuppressed()) {
- return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED,
- user_name);
+ ProfileSyncService::Status status;
+ service->QueryDetailedSyncStatus(&status);
+ if (status.sync_protocol_error.error_type == syncer::NOT_MY_BIRTHDAY) {
+ return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED,
+ user_name);
+ } else {
+ return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_STOPPED,
+ user_name);
+ }
}
}
@@ -245,6 +252,16 @@ MessageType GetStatusInfo(ProfileSyncService* service,
} else if (status_label) {
status_label->assign(l10n_util::GetStringUTF16(IDS_SYNC_SETUP_ERROR));
}
+ } else if (!signin.GetAuthenticatedUsername().empty() &&
+ !service->HasSyncSetupCompleted()) {
+ // The user is signed in, but sync is disabled.
+ if (status_label) {
+ string16 label = l10n_util::GetStringFUTF16(
+ IDS_SIGNED_IN_WITH_SYNC_STOPPED,
+ UTF8ToUTF16(signin.GetAuthenticatedUsername()));
+ status_label->assign(label);
+ result_type = PRE_SYNCED;
+ }
}
}
return result_type;

Powered by Google App Engine
This is Rietveld 408576698