| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chromeos/login/login_state.h" | 5 #include "chromeos/login/login_state.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
| 10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 logged_in_user_type_ == LOGGED_IN_USER_LOCALLY_MANAGED; | 128 logged_in_user_type_ == LOGGED_IN_USER_LOCALLY_MANAGED; |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool LoginState::IsUserGaiaAuthenticated() const { | 131 bool LoginState::IsUserGaiaAuthenticated() const { |
| 132 return logged_in_user_type_ == LOGGED_IN_USER_REGULAR || | 132 return logged_in_user_type_ == LOGGED_IN_USER_REGULAR || |
| 133 logged_in_user_type_ == LOGGED_IN_USER_OWNER; | 133 logged_in_user_type_ == LOGGED_IN_USER_OWNER; |
| 134 } | 134 } |
| 135 | 135 |
| 136 // Private methods | 136 // Private methods |
| 137 | 137 |
| 138 LoginState::LoginState() : logged_in_state_(LOGGED_IN_OOBE), | 138 LoginState::LoginState() : logged_in_state_(LOGGED_IN_NONE), |
| 139 logged_in_user_type_(LOGGED_IN_USER_NONE), | 139 logged_in_user_type_(LOGGED_IN_USER_NONE), |
| 140 always_logged_in_(AlwaysLoggedInByDefault()) { | 140 always_logged_in_(AlwaysLoggedInByDefault()) { |
| 141 } | 141 } |
| 142 | 142 |
| 143 LoginState::~LoginState() { | 143 LoginState::~LoginState() { |
| 144 } | 144 } |
| 145 | 145 |
| 146 void LoginState::NotifyObservers() { | 146 void LoginState::NotifyObservers() { |
| 147 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_, | 147 FOR_EACH_OBSERVER(LoginState::Observer, observer_list_, |
| 148 LoggedInStateChanged()); | 148 LoggedInStateChanged()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace chromeos | 151 } // namespace chromeos |
| OLD | NEW |