| 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 5ee7a1af773297d1686ca7169beeca8c3b48def5..0f3d7aea90496d345dd015592ca292665eac6135 100644
|
| --- a/chrome/browser/ui/sync/one_click_signin_helper.cc
|
| +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
|
| @@ -83,15 +83,16 @@ void AddEmailToOneClickRejectedList(Profile* profile,
|
| }
|
|
|
| // Start syncing with the given user information.
|
| -void StartSync(Browser* browser,
|
| +void StartSync(Profile* profile,
|
| + Browser* browser,
|
| OneClickSigninHelper::AutoAccept auto_accept,
|
| const std::string& session_index,
|
| const std::string& email,
|
| const std::string& password,
|
| OneClickSigninSyncStarter::StartSyncMode start_mode) {
|
| // The starter deletes itself once its done.
|
| - new OneClickSigninSyncStarter(browser, session_index, email, password,
|
| - start_mode);
|
| + new OneClickSigninSyncStarter(profile, browser, session_index, email,
|
| + password, start_mode);
|
|
|
| int action = one_click_signin::HISTOGRAM_MAX;
|
| switch (auto_accept) {
|
| @@ -309,7 +310,7 @@ bool OneClickInfoBarDelegateImpl::Accept() {
|
| chrome::FindBrowserWithWebContents(web_contents)->window()->
|
| ShowOneClickSigninBubble(
|
| BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE,
|
| - base::Bind(&StartSync, browser,
|
| + base::Bind(&StartSync, profile, browser,
|
| OneClickSigninHelper::AUTO_ACCEPT_NONE, session_index_,
|
| email_, password_));
|
| button_pressed_ = true;
|
| @@ -865,17 +866,17 @@ void OneClickSigninHelper::DidStopLoading(
|
| SigninManager::DisableOneClickSignIn(profile);
|
| browser->window()->ShowOneClickSigninBubble(
|
| BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG,
|
| - base::Bind(&StartSync, browser, auto_accept_, session_index_,
|
| + base::Bind(&StartSync, profile, browser, auto_accept_, session_index_,
|
| email_, password_));
|
| break;
|
| case AUTO_ACCEPT_CONFIGURE:
|
| SigninManager::DisableOneClickSignIn(profile);
|
| - StartSync(browser, auto_accept_, session_index_, email_, password_,
|
| - OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST);
|
| + StartSync(profile, browser, auto_accept_, session_index_, email_,
|
| + password_, OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST);
|
| break;
|
| case AUTO_ACCEPT_EXPLICIT:
|
| - StartSync(browser, auto_accept_, session_index_, email_, password_,
|
| - source_ == SyncPromoUI::SOURCE_SETTINGS ?
|
| + StartSync(profile, browser, auto_accept_, session_index_, email_,
|
| + password_, source_ == SyncPromoUI::SOURCE_SETTINGS ?
|
| OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST :
|
| OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS);
|
|
|
|
|