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

Unified Diff: chrome/browser/dom_ui/options/personal_options_handler.cc

Issue 6459014: Call ProfileSyncService::ShowErrorUI for post login sync errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/options/personal_options_handler.cc
diff --git a/chrome/browser/dom_ui/options/personal_options_handler.cc b/chrome/browser/dom_ui/options/personal_options_handler.cc
index f749e396881b7d7220525bc081a71db05661b40a..504ea54b4ca92bfe358c70861410ea89fcfd82b5 100644
--- a/chrome/browser/dom_ui/options/personal_options_handler.cc
+++ b/chrome/browser/dom_ui/options/personal_options_handler.cc
@@ -322,19 +322,23 @@ void PersonalOptionsHandler::Initialize() {
}
void PersonalOptionsHandler::ShowSyncLoginDialog(const ListValue* args) {
-#if defined(OS_CHROMEOS)
- std::string email = chromeos::UserManager::Get()->logged_in_user().email();
- string16 message = l10n_util::GetStringFUTF16(
- IDS_SYNC_LOGIN_INTRODUCTION,
- l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
- dom_ui_->GetProfile()->GetBrowserSignin()->RequestSignin(
- dom_ui_->tab_contents(), UTF8ToUTF16(email), message, this);
-#else
ProfileSyncService* service = dom_ui_->GetProfile()->GetProfileSyncService();
DCHECK(service);
- service->ShowLoginDialog(NULL);
- ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
+ if (service->HasSyncSetupCompleted()) {
+ service->ShowErrorUI(NULL);
+ } else {
+#if defined(OS_CHROMEOS)
+ std::string email = chromeos::UserManager::Get()->logged_in_user().email();
+ string16 message = l10n_util::GetStringFUTF16(
+ IDS_SYNC_LOGIN_INTRODUCTION,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ dom_ui_->GetProfile()->GetBrowserSignin()->RequestSignin(
+ dom_ui_->tab_contents(), UTF8ToUTF16(email), message, this);
+#else
+ service->ShowLoginDialog(NULL);
+ ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
#endif
+ }
}
void PersonalOptionsHandler::ShowCustomizeSyncDialog(const ListValue* args) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698