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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 void 657 void
658 OneClickSigninHelper::SyncStarterWrapper::StartOneClickSigninSyncStarter( 658 OneClickSigninHelper::SyncStarterWrapper::StartOneClickSigninSyncStarter(
659 const std::string& email, 659 const std::string& email,
660 const std::string& refresh_token) { 660 const std::string& refresh_token) {
661 // The starter deletes itself once it's done. 661 // The starter deletes itself once it's done.
662 new OneClickSigninSyncStarter(args_.profile, args_.browser, 662 new OneClickSigninSyncStarter(args_.profile, args_.browser,
663 email, args_.password, 663 email, args_.password,
664 refresh_token, start_mode_, 664 refresh_token, start_mode_,
665 args_.web_contents, 665 args_.web_contents,
666 args_.confirmation_required, 666 args_.confirmation_required,
667 GURL(),
667 args_.callback); 668 args_.callback);
668 } 669 }
669 670
670 671
671 // OneClickSigninHelper ------------------------------------------------------- 672 // OneClickSigninHelper -------------------------------------------------------
672 673
673 DEFINE_WEB_CONTENTS_USER_DATA_KEY(OneClickSigninHelper); 674 DEFINE_WEB_CONTENTS_USER_DATA_KEY(OneClickSigninHelper);
674 675
675 // static 676 // static
676 const int OneClickSigninHelper::kMaxNavigationsSince = 10; 677 const int OneClickSigninHelper::kMaxNavigationsSince = 10;
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 // If the web contents is showing a blank page and not about to be closed, 1599 // If the web contents is showing a blank page and not about to be closed,
1599 // redirect to the NTP or apps page. 1600 // redirect to the NTP or apps page.
1600 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && 1601 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) &&
1601 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { 1602 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) {
1602 RedirectToNtpOrAppsPage( 1603 RedirectToNtpOrAppsPage(
1603 web_contents(), 1604 web_contents(),
1604 signin::GetSourceForPromoURL(original_continue_url_)); 1605 signin::GetSourceForPromoURL(original_continue_url_));
1605 } 1606 }
1606 } 1607 }
1607 } 1608 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698