Index: chrome/browser/ui/sync/one_click_signin_helper.cc |
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc |
index 4c020191d3ba52cdfd1fcb2159e0fe7b752f76db..39261c957a6b91ccbcddad089431bb09c84c70c6 100644 |
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc |
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc |
@@ -1187,28 +1187,24 @@ bool OneClickSigninHelper::HandleCrossAccountError( |
content::WebContents* contents = |
browser->tab_strip_model()->GetActiveWebContents(); |
+ OneClickSigninHelper::StartSyncArgs start_sync_args( |
+ StartSyncArgs(profile, browser, auto_accept, |
Roger Tawa OOO till Jul 10th
2014/08/14 21:54:09
Can this just be:
StartSyncArgs start_sync_arg
|
+ session_index, email, password, |
+ refresh_token, |
+ contents, false /* untrusted_confirmation_required */, |
+ source, sync_callback)); |
// If the user signs in from the new avatar bubble, the confirm email dialog |
- // would dismiss the avatar bubble, thus it won't show any confirmation upon |
- // sign in completes. This confirmation dialog already mentions that user |
- // data would be synced, thus we just start sync immediately. |
- // TODO(guohui): add a sync settings link to allow user to configure sync |
- // settings before sync starts. |
- if (start_mode == OneClickSigninSyncStarter::CONFIRM_SYNC_SETTINGS_FIRST) |
- start_mode = OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS; |
- |
+ // would dismiss the avatar bubble, thus we need to manually re-show the |
+ // avatar bubble to confirm sync settings. |
+ if (start_mode == OneClickSigninSyncStarter::CONFIRM_SYNC_SETTINGS_FIRST) { |
+ start_sync_args.confirmation_required = |
+ OneClickSigninSyncStarter::CONFIRM_AFTER_SIGNIN; |
+ } |
ConfirmEmailDialogDelegate::AskForConfirmation( |
contents, |
last_email, |
email, |
- base::Bind( |
- &StartExplicitSync, |
- StartSyncArgs(profile, browser, auto_accept, |
- session_index, email, password, |
- refresh_token, |
- contents, false /* confirmation_required */, source, |
- sync_callback), |
- contents, |
- start_mode)); |
+ base::Bind(&StartExplicitSync, start_sync_args, contents, start_mode)); |
return true; |
} |