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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 2594703002: Create a new profile and sign in the user. (Closed)
Patch Set: Rebase Created 4 years 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/webui/signin/inline_login_handler_impl.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index 1e6f110684d1ed9c31def253f90b79f04fcc1ae5..b0ecfb59ce82839bc9788301d54a0ae6fde6ccc8 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -285,7 +285,8 @@ void InlineSigninHelper::OnClientOAuthSuccessAndBrowserOpened(
if (start_signin) {
CreateSyncStarter(browser, contents, current_url_,
signin::GetNextPageURLForPromoURL(current_url_),
- result.refresh_token, start_mode,
+ result.refresh_token,
+ OneClickSigninSyncStarter::CURRENT_PROFILE, start_mode,
confirmation_required);
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
@@ -298,12 +299,14 @@ void InlineSigninHelper::CreateSyncStarter(
const GURL& current_url,
const GURL& continue_url,
const std::string& refresh_token,
+ OneClickSigninSyncStarter::ProfileMode profile_mode,
OneClickSigninSyncStarter::StartSyncMode start_mode,
OneClickSigninSyncStarter::ConfirmationRequired confirmation_required) {
// OneClickSigninSyncStarter will delete itself once the job is done.
new OneClickSigninSyncStarter(
- profile_, browser, gaia_id_, email_, password_, refresh_token, start_mode,
- contents, confirmation_required, current_url, continue_url,
+ profile_, browser, gaia_id_, email_, password_, refresh_token,
+ profile_mode, start_mode, contents, confirmation_required, current_url,
+ continue_url,
base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_));
}
@@ -346,18 +349,17 @@ void InlineSigninHelper::ConfirmEmailAction(
case SigninEmailConfirmationDialog::CREATE_NEW_USER:
content::RecordAction(
base::UserMetricsAction("Signin_ImportDataPrompt_DontImport"));
- if (handler_) {
- handler_->SyncStarterCallback(
- OneClickSigninSyncStarter::SYNC_SETUP_FAILURE);
- }
- UserManager::Show(base::FilePath(), profiles::USER_MANAGER_NO_TUTORIAL,
- profiles::USER_MANAGER_OPEN_CREATE_USER_PAGE);
+ CreateSyncStarter(browser, web_contents, current_url_, GURL(),
+ refresh_token, OneClickSigninSyncStarter::NEW_PROFILE,
+ start_mode, confirmation_required);
break;
case SigninEmailConfirmationDialog::START_SYNC:
content::RecordAction(
base::UserMetricsAction("Signin_ImportDataPrompt_ImportData"));
CreateSyncStarter(browser, web_contents, current_url_, GURL(),
- refresh_token, start_mode, confirmation_required);
+ refresh_token,
+ OneClickSigninSyncStarter::CURRENT_PROFILE, start_mode,
+ confirmation_required);
break;
case SigninEmailConfirmationDialog::CLOSE:
content::RecordAction(

Powered by Google App Engine
This is Rietveld 408576698