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

Side by Side Diff: chrome/browser/signin/signin_manager.cc

Issue 131973004: Eliminate usage of PO2TS::GetPrimaryAccountID() in UbertokenFetcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile failure Created 6 years, 11 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/signin/signin_manager.h" 5 #include "chrome/browser/signin/signin_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 DCHECK(!temp_oauth_login_tokens_.refresh_token.empty()); 584 DCHECK(!temp_oauth_login_tokens_.refresh_token.empty());
585 DCHECK(!GetAuthenticatedUsername().empty()); 585 DCHECK(!GetAuthenticatedUsername().empty());
586 ProfileOAuth2TokenService* token_service = 586 ProfileOAuth2TokenService* token_service =
587 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); 587 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
588 token_service->UpdateCredentials(GetAuthenticatedUsername(), 588 token_service->UpdateCredentials(GetAuthenticatedUsername(),
589 temp_oauth_login_tokens_.refresh_token); 589 temp_oauth_login_tokens_.refresh_token);
590 temp_oauth_login_tokens_ = ClientOAuthResult(); 590 temp_oauth_login_tokens_ = ClientOAuthResult();
591 591
592 if (do_merge_session_in_signin_manager) 592 if (do_merge_session_in_signin_manager)
593 merge_session_helper_->LogIn(); 593 merge_session_helper_->LogIn(GetAuthenticatedUsername());
594 } 594 }
595 595
596 void SigninManager::OnExternalSigninCompleted(const std::string& username) { 596 void SigninManager::OnExternalSigninCompleted(const std::string& username) {
597 OnSignedIn(username); 597 OnSignedIn(username);
598 } 598 }
599 599
600 void SigninManager::OnSignedIn(const std::string& username) { 600 void SigninManager::OnSignedIn(const std::string& username) {
601 SetAuthenticatedUsername(username); 601 SetAuthenticatedUsername(username);
602 possibly_invalid_username_.clear(); 602 possibly_invalid_username_.clear();
603 profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, 603 profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 } 646 }
647 647
648 void SigninManager::ProhibitSignout(bool prohibit_signout) { 648 void SigninManager::ProhibitSignout(bool prohibit_signout) {
649 prohibit_signout_ = prohibit_signout; 649 prohibit_signout_ = prohibit_signout;
650 } 650 }
651 651
652 bool SigninManager::IsSignoutProhibited() const { 652 bool SigninManager::IsSignoutProhibited() const {
653 return prohibit_signout_; 653 return prohibit_signout_;
654 } 654 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/google_auto_login_helper.cc ('k') | chrome/browser/signin/ubertoken_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698