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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.cc

Issue 1806193003: Under the tab-modal signin flow, always show the Confirmation dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix spelling Created 4 years, 9 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/ui/sync/one_click_signin_sync_starter.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index 6e500993f6b60a012e03222c1cc7a2993f201c6c..c9020a2e8a3fbccbc47f689d2d7b6ed627ae588b 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -392,6 +392,13 @@ void OneClickSigninSyncStarter::UntrustedSigninConfirmed(
void OneClickSigninSyncStarter::OnSyncConfirmationUIClosed(
LoginUIService::SyncConfirmationUIClosedResults results) {
+
+ if (switches::UsePasswordSeparatedSigninFlow()) {
+ // We didn't run this callback in AccountAddedToCookie so do it now.
+ if (!sync_setup_completed_callback_.is_null())
+ sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS);
+ }
+
switch (results) {
case LoginUIService::CONFIGURE_SYNC_FIRST:
content::RecordAction(
@@ -454,6 +461,14 @@ void OneClickSigninSyncStarter::AccountAddedToCookie(
// Regardless of whether the account was successfully added or not,
// continue with sync starting.
+ if (switches::UsePasswordSeparatedSigninFlow()) {
+ // Under the new signin flow, the sync confirmation dialog should always be
+ // shown regardless of |start_mode_|. |sync_setup_completed_callback_| will
+ // be run after the modal is closed.
+ DisplayModalSyncConfirmationWindow();
+ return;
+ }
+
if (!sync_setup_completed_callback_.is_null())
sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS);
@@ -476,12 +491,8 @@ void OneClickSigninSyncStarter::AccountAddedToCookie(
break;
}
case CONFIRM_SYNC_SETTINGS_FIRST:
- if (switches::UsePasswordSeparatedSigninFlow()) {
- DisplayModalSyncConfirmationWindow();
- } else {
- // Blocks sync until the sync settings confirmation UI is closed.
- DisplayFinalConfirmationBubble(base::string16());
- }
+ // Blocks sync until the sync settings confirmation UI is closed.
+ DisplayFinalConfirmationBubble(base::string16());
return;
case CONFIGURE_SYNC_FIRST:
ShowSettingsPage(true); // Show sync config UI.
« 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