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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 196783002: Export a private webstore API to call into the new inline sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a spurious diff Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 if (start_signin) { 150 if (start_signin) {
151 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. 151 // Call OneClickSigninSyncStarter to exchange oauth code for tokens.
152 // OneClickSigninSyncStarter will delete itself once the job is done. 152 // OneClickSigninSyncStarter will delete itself once the job is done.
153 new OneClickSigninSyncStarter( 153 new OneClickSigninSyncStarter(
154 profile_, browser, 154 profile_, browser,
155 email, password_, refresh_token, 155 email, password_, refresh_token,
156 start_mode, 156 start_mode,
157 contents, 157 contents,
158 confirmation_required, 158 confirmation_required,
159 signin::GetNextPageURLForPromoURL(current_url_),
159 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_)); 160 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_));
160 } 161 }
161 } 162 }
162 163
163 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 164 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
164 } 165 }
165 166
166 void InlineSigninHelper::OnSigninOAuthInformationFailure( 167 void InlineSigninHelper::OnSigninOAuthInformationFailure(
167 const GoogleServiceAuthError& error) { 168 const GoogleServiceAuthError& error) {
168 if (handler_) 169 if (handler_)
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 TabStripModel* tab_strip_model = browser->tab_strip_model(); 399 TabStripModel* tab_strip_model = browser->tab_strip_model();
399 if (tab_strip_model) { 400 if (tab_strip_model) {
400 int index = tab_strip_model->GetIndexOfWebContents(tab); 401 int index = tab_strip_model->GetIndexOfWebContents(tab);
401 if (index != TabStripModel::kNoTab) { 402 if (index != TabStripModel::kNoTab) {
402 tab_strip_model->ExecuteContextMenuCommand( 403 tab_strip_model->ExecuteContextMenuCommand(
403 index, TabStripModel::CommandCloseTab); 404 index, TabStripModel::CommandCloseTab);
404 } 405 }
405 } 406 }
406 } 407 }
407 } 408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698