| 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) {
|
|
|