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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 14630003: signin: move SigninManagerBase::Signout to SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apocalypse Created 7 years, 7 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 return DONT_OFFER; 652 return DONT_OFFER;
653 653
654 // The checks below depend on chrome already knowing what account the user 654 // The checks below depend on chrome already knowing what account the user
655 // signed in with. This happens only after receiving the response containing 655 // signed in with. This happens only after receiving the response containing
656 // the Google-Accounts-SignIn header. Until then, if there is even a chance 656 // the Google-Accounts-SignIn header. Until then, if there is even a chance
657 // that we want to connect the profile, chrome needs to tell Gaia that 657 // that we want to connect the profile, chrome needs to tell Gaia that
658 // it should offer the interstitial. Therefore missing one click data on 658 // it should offer the interstitial. Therefore missing one click data on
659 // the request means can offer is true. 659 // the request means can offer is true.
660 const std::string& pending_email = io_data->reverse_autologin_pending_email(); 660 const std::string& pending_email = io_data->reverse_autologin_pending_email();
661 if (!pending_email.empty()) { 661 if (!pending_email.empty()) {
662 if (!SigninManager::IsAllowedUsername(pending_email, 662 if (!SigninManager::IsUsernameAllowedByPolicy(pending_email,
663 io_data->google_services_username_pattern()->GetValue())) { 663 io_data->google_services_username_pattern()->GetValue())) {
664 return DONT_OFFER; 664 return DONT_OFFER;
665 } 665 }
666 666
667 std::vector<std::string> rejected_emails = 667 std::vector<std::string> rejected_emails =
668 io_data->one_click_signin_rejected_email_list()->GetValue(); 668 io_data->one_click_signin_rejected_email_list()->GetValue();
669 if (std::count_if(rejected_emails.begin(), rejected_emails.end(), 669 if (std::count_if(rejected_emails.begin(), rejected_emails.end(),
670 std::bind2nd(std::equal_to<std::string>(), 670 std::bind2nd(std::equal_to<std::string>(),
671 pending_email)) > 0) { 671 pending_email)) > 0) {
672 return DONT_OFFER; 672 return DONT_OFFER;
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } 1279 }
1280 } 1280 }
1281 ShowSyncConfirmationBubble(display_bubble); 1281 ShowSyncConfirmationBubble(display_bubble);
1282 signin_tracker_.reset(); 1282 signin_tracker_.reset();
1283 } 1283 }
1284 1284
1285 void OneClickSigninHelper::SigninSuccess() { 1285 void OneClickSigninHelper::SigninSuccess() {
1286 ShowSyncConfirmationBubble(true); 1286 ShowSyncConfirmationBubble(true);
1287 signin_tracker_.reset(); 1287 signin_tracker_.reset();
1288 } 1288 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698