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..1f84317a58ef1acaf06b65a166400ad6922f6d5b 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) { |
Andrew T Wilson (Slow)
2013/05/15 15:01:24
If you clear the sync dashboard, then restart chro
Raghu Simha
2013/05/16 02:13:20
I just checked -- birthday errors are not persiste
|
+ 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); |
+ } |
} |
} |
@@ -226,10 +233,10 @@ MessageType GetStatusInfo(ProfileSyncService* service, |
} |
} else if (auth_error.state() != AuthError::NONE && |
auth_error.state() != AuthError::TWO_FACTOR) { |
- if (status_label) { |
+ if (status_label && link_label) { |
Andrew T Wilson (Slow)
2013/05/15 15:01:24
Are we sure this is OK? Aren't there callers that
Raghu Simha
2013/05/16 02:13:20
Yes, this is okay. There's a check on line 129 tha
|
status_label->clear(); |
signin_ui_util::GetStatusLabelsForAuthError( |
- signin, status_label, NULL); |
+ signin, status_label, link_label); |
} |
result_type = SYNC_ERROR; |
} |
@@ -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. |
Andrew T Wilson (Slow)
2013/05/15 15:01:24
Hmmm. Do you need the !service->HasSyncSetupComple
Raghu Simha
2013/05/16 02:13:20
You're right. I've removed the redundant check.
|
+ 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; |