| 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_base.h" | 5 #include "components/signin/core/browser/signin_manager_base.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Go ahead and update the last signed in username here as well. Once a | 89 // Go ahead and update the last signed in username here as well. Once a |
| 90 // user is signed in the two preferences should match. Doing it here as | 90 // user is signed in the two preferences should match. Doing it here as |
| 91 // opposed to on signin allows us to catch the upgrade scenario. | 91 // opposed to on signin allows us to catch the upgrade scenario. |
| 92 client_->GetPrefs()->SetString(prefs::kGoogleServicesLastUsername, username); | 92 client_->GetPrefs()->SetString(prefs::kGoogleServicesLastUsername, username); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void SigninManagerBase::clear_authenticated_username() { | 95 void SigninManagerBase::clear_authenticated_username() { |
| 96 authenticated_username_.clear(); | 96 authenticated_username_.clear(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool SigninManagerBase::IsAuthenticated() const { |
| 100 return !GetAuthenticatedAccountId().empty(); |
| 101 } |
| 102 |
| 99 bool SigninManagerBase::AuthInProgress() const { | 103 bool SigninManagerBase::AuthInProgress() const { |
| 100 // SigninManagerBase never kicks off auth processes itself. | 104 // SigninManagerBase never kicks off auth processes itself. |
| 101 return false; | 105 return false; |
| 102 } | 106 } |
| 103 | 107 |
| 104 void SigninManagerBase::Shutdown() {} | 108 void SigninManagerBase::Shutdown() {} |
| 105 | 109 |
| 106 void SigninManagerBase::AddObserver(Observer* observer) { | 110 void SigninManagerBase::AddObserver(Observer* observer) { |
| 107 observer_list_.AddObserver(observer); | 111 observer_list_.AddObserver(observer); |
| 108 } | 112 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 129 NotifySigninValueChanged(field, value)); | 133 NotifySigninValueChanged(field, value)); |
| 130 } | 134 } |
| 131 | 135 |
| 132 void SigninManagerBase::NotifyDiagnosticsObservers( | 136 void SigninManagerBase::NotifyDiagnosticsObservers( |
| 133 const TimedSigninStatusField& field, | 137 const TimedSigninStatusField& field, |
| 134 const std::string& value) { | 138 const std::string& value) { |
| 135 FOR_EACH_OBSERVER(SigninDiagnosticsObserver, | 139 FOR_EACH_OBSERVER(SigninDiagnosticsObserver, |
| 136 signin_diagnostics_observers_, | 140 signin_diagnostics_observers_, |
| 137 NotifySigninValueChanged(field, value)); | 141 NotifySigninValueChanged(field, value)); |
| 138 } | 142 } |
| OLD | NEW |