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

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: Add API tests Created 6 years, 9 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 if (start_signin) { 149 if (start_signin) {
150 // Call OneClickSigninSyncStarter to exchange oauth code for tokens. 150 // Call OneClickSigninSyncStarter to exchange oauth code for tokens.
151 // OneClickSigninSyncStarter will delete itself once the job is done. 151 // OneClickSigninSyncStarter will delete itself once the job is done.
152 new OneClickSigninSyncStarter( 152 new OneClickSigninSyncStarter(
153 profile_, browser, 153 profile_, browser,
154 email, password_, refresh_token, 154 email, password_, refresh_token,
155 start_mode, 155 start_mode,
156 contents, 156 contents,
157 confirmation_required, 157 confirmation_required,
158 signin::GetNextPageURLForPromoURL(current_url_),
158 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_)); 159 base::Bind(&InlineLoginHandlerImpl::SyncStarterCallback, handler_));
159 } 160 }
160 } 161 }
161 162
162 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 163 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
163 } 164 }
164 165
165 void InlineSigninHelper::OnSigninOAuthInformationFailure( 166 void InlineSigninHelper::OnSigninOAuthInformationFailure(
166 const GoogleServiceAuthError& error) { 167 const GoogleServiceAuthError& error) {
167 if (handler_) 168 if (handler_)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 TabStripModel* tab_strip_model = browser->tab_strip_model(); 411 TabStripModel* tab_strip_model = browser->tab_strip_model();
411 if (tab_strip_model) { 412 if (tab_strip_model) {
412 int index = tab_strip_model->GetIndexOfWebContents(tab); 413 int index = tab_strip_model->GetIndexOfWebContents(tab);
413 if (index != TabStripModel::kNoTab) { 414 if (index != TabStripModel::kNoTab) {
414 tab_strip_model->ExecuteContextMenuCommand( 415 tab_strip_model->ExecuteContextMenuCommand(
415 index, TabStripModel::CommandCloseTab); 416 index, TabStripModel::CommandCloseTab);
416 } 417 }
417 } 418 }
418 } 419 }
419 } 420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698