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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2920853004: [sync] Display an error when sync settings aren't confirmed (Closed)
Patch Set: fix compile Created 3 years, 6 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/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index bfc03b885ebf270d88a5bdcdd39a40c4e56cead9..51f15204af96e480de24ef455111690f9e51e9f1 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -812,7 +812,8 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
} else if (sender == auth_error_email_button_ ||
sender == sync_error_signin_button_) {
ShowViewFromMode(profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH);
- } else if (sender == sync_error_passphrase_button_) {
+ } else if (sender == sync_error_passphrase_button_ ||
+ sender == sync_error_settings_unconfirmed_button_) {
chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage);
} else if (sender == sync_error_upgrade_button_) {
chrome::OpenUpdateChromeDialog(browser_);
@@ -993,9 +994,12 @@ views::View* ProfileChooserView::CreateProfileChooserView(
views::View* ProfileChooserView::CreateSyncErrorViewIfNeeded() {
int content_string_id, button_string_id;
views::LabelButton** button_out = nullptr;
+ SigninManagerBase* signin_manager =
+ SigninManagerFactory::GetForProfile(browser_->profile());
sync_ui_util::AvatarSyncErrorType error =
sync_ui_util::GetMessagesForAvatarSyncError(
- browser_->profile(), &content_string_id, &button_string_id);
+ browser_->profile(), *signin_manager, &content_string_id,
+ &button_string_id);
switch (error) {
case sync_ui_util::MANAGED_USER_UNRECOVERABLE_ERROR:
button_out = &sync_error_signout_button_;
@@ -1015,6 +1019,9 @@ views::View* ProfileChooserView::CreateSyncErrorViewIfNeeded() {
case sync_ui_util::PASSPHRASE_ERROR:
button_out = &sync_error_passphrase_button_;
break;
+ case sync_ui_util::SETTINGS_UNCONFIRMED_ERROR:
+ button_out = &sync_error_settings_unconfirmed_button_;
+ break;
case sync_ui_util::NO_SYNC_ERROR:
return nullptr;
default:

Powered by Google App Engine
This is Rietveld 408576698