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

Side by Side Diff: components/signin/core/browser/signin_manager.cc

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix iOs Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/core/browser/signin_manager.h" 5 #include "components/signin/core/browser/signin_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 26 matching lines...) Expand all
37 client_(client), 37 client_(client),
38 token_service_(token_service), 38 token_service_(token_service),
39 cookie_manager_service_(cookie_manager_service), 39 cookie_manager_service_(cookie_manager_service),
40 signin_manager_signed_in_(false), 40 signin_manager_signed_in_(false),
41 user_info_fetched_by_account_tracker_(false), 41 user_info_fetched_by_account_tracker_(false),
42 weak_pointer_factory_(this) {} 42 weak_pointer_factory_(this) {}
43 43
44 SigninManager::~SigninManager() {} 44 SigninManager::~SigninManager() {}
45 45
46 void SigninManager::InitTokenService() { 46 void SigninManager::InitTokenService() {
47 if (token_service_ && IsAuthenticated()) 47 if (token_service_)
48 token_service_->LoadCredentials(GetAuthenticatedAccountId()); 48 token_service_->LoadCredentials(GetAuthenticatedAccountId());
49 } 49 }
50 50
51 std::string SigninManager::SigninTypeToString(SigninManager::SigninType type) { 51 std::string SigninManager::SigninTypeToString(SigninManager::SigninType type) {
52 switch (type) { 52 switch (type) {
53 case SIGNIN_TYPE_NONE: 53 case SIGNIN_TYPE_NONE:
54 return "No Signin"; 54 return "No Signin";
55 case SIGNIN_TYPE_WITH_REFRESH_TOKEN: 55 case SIGNIN_TYPE_WITH_REFRESH_TOKEN:
56 return "With refresh token"; 56 return "With refresh token";
57 } 57 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 account_tracker_service()->SetMigrationDone(); 411 account_tracker_service()->SetMigrationDone();
412 token_service_->RemoveObserver(this); 412 token_service_->RemoveObserver(this);
413 } 413 }
414 } 414 }
415 415
416 void SigninManager::ProhibitSignout(bool prohibit_signout) { 416 void SigninManager::ProhibitSignout(bool prohibit_signout) {
417 prohibit_signout_ = prohibit_signout; 417 prohibit_signout_ = prohibit_signout;
418 } 418 }
419 419
420 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } 420 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698