Chromium Code Reviews| 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..ef05f6472ba58f9f7dfda475b3c2988df227153a 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 ran after the modal is closed. |
|
Roger Tawa OOO till Jul 10th
2016/03/18 04:01:50
ran --> run
anthonyvd
2016/03/18 13:59:07
Done.
|
| + 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. |