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

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: Reformat, remove browser_options change 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 87acdfec593c2bab8581a341392cfe41d93e4f07..5f8086ff21c8c9788ee6cd2a879499b238c658a5 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -576,6 +576,7 @@ void ProfileChooserView::ResetView() {
reauth_account_button_map_.clear();
sync_error_signin_button_ = nullptr;
sync_error_passphrase_button_ = nullptr;
+ sync_error_settings_unconfirmed_button_ = nullptr;
sync_error_upgrade_button_ = nullptr;
sync_error_signin_again_button_ = nullptr;
sync_error_signout_button_ = nullptr;
@@ -805,7 +806,8 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
profiles::CloseProfileWindows(browser_->profile());
} else if (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_);
@@ -986,9 +988,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_;
@@ -1008,6 +1013,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:
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.h ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698