| OLD | NEW |
| 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.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 SigninManager::SigninManager(SigninClient* client, | 62 SigninManager::SigninManager(SigninClient* client, |
| 63 ProfileOAuth2TokenService* token_service, | 63 ProfileOAuth2TokenService* token_service, |
| 64 AccountTrackerService* account_tracker_service) | 64 AccountTrackerService* account_tracker_service) |
| 65 : SigninManagerBase(client), | 65 : SigninManagerBase(client), |
| 66 prohibit_signout_(false), | 66 prohibit_signout_(false), |
| 67 type_(SIGNIN_TYPE_NONE), | 67 type_(SIGNIN_TYPE_NONE), |
| 68 client_(client), | 68 client_(client), |
| 69 token_service_(token_service), | 69 token_service_(token_service), |
| 70 account_tracker_service_(account_tracker_service), | 70 account_tracker_service_(account_tracker_service), |
| 71 weak_pointer_factory_(this), | |
| 72 signin_manager_signed_in_(false), | 71 signin_manager_signed_in_(false), |
| 73 user_info_fetched_by_account_tracker_(false) {} | 72 user_info_fetched_by_account_tracker_(false), |
| 73 weak_pointer_factory_(this) {} |
| 74 | 74 |
| 75 void SigninManager::AddMergeSessionObserver( | 75 void SigninManager::AddMergeSessionObserver( |
| 76 MergeSessionHelper::Observer* observer) { | 76 MergeSessionHelper::Observer* observer) { |
| 77 if (merge_session_helper_) | 77 if (merge_session_helper_) |
| 78 merge_session_helper_->AddObserver(observer); | 78 merge_session_helper_->AddObserver(observer); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void SigninManager::RemoveMergeSessionObserver( | 81 void SigninManager::RemoveMergeSessionObserver( |
| 82 MergeSessionHelper::Observer* observer) { | 82 MergeSessionHelper::Observer* observer) { |
| 83 if (merge_session_helper_) | 83 if (merge_session_helper_) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 void SigninManager::OnAccountUpdateFailed(const std::string& account_id) { | 425 void SigninManager::OnAccountUpdateFailed(const std::string& account_id) { |
| 426 user_info_fetched_by_account_tracker_ = true; | 426 user_info_fetched_by_account_tracker_ = true; |
| 427 PostSignedIn(); | 427 PostSignedIn(); |
| 428 } | 428 } |
| 429 | 429 |
| 430 void SigninManager::ProhibitSignout(bool prohibit_signout) { | 430 void SigninManager::ProhibitSignout(bool prohibit_signout) { |
| 431 prohibit_signout_ = prohibit_signout; | 431 prohibit_signout_ = prohibit_signout; |
| 432 } | 432 } |
| 433 | 433 |
| 434 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } | 434 bool SigninManager::IsSignoutProhibited() const { return prohibit_signout_; } |
| OLD | NEW |