| 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 "chromeos/login/auth/user_context.h" | 5 #include "chromeos/login/auth/user_context.h" |
| 6 #include "chromeos/login/user_names.h" | 6 #include "chromeos/login/user_names.h" |
| 7 | 7 |
| 8 namespace chromeos { | 8 namespace chromeos { |
| 9 | 9 |
| 10 UserContext::UserContext() | 10 UserContext::UserContext() |
| 11 : is_using_oauth_(true), | 11 : is_using_oauth_(true), |
| 12 auth_flow_(AUTH_FLOW_OFFLINE), | 12 auth_flow_(AUTH_FLOW_OFFLINE), |
| 13 user_type_(user_manager::USER_TYPE_REGULAR) { | 13 user_type_(user_manager::USER_TYPE_REGULAR) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 UserContext::UserContext(const UserContext& other) | 16 UserContext::UserContext(const UserContext& other) |
| 17 : user_id_(other.user_id_), | 17 : user_id_(other.user_id_), |
| 18 gaia_id_(other.gaia_id_), | 18 gaia_id_(other.gaia_id_), |
| 19 key_(other.key_), | 19 key_(other.key_), |
| 20 auth_code_(other.auth_code_), | 20 auth_code_(other.auth_code_), |
| 21 refresh_token_(other.refresh_token_), | 21 refresh_token_(other.refresh_token_), |
| 22 access_token_(other.access_token_), | 22 access_token_(other.access_token_), |
| 23 user_id_hash_(other.user_id_hash_), | 23 user_id_hash_(other.user_id_hash_), |
| 24 is_using_oauth_(other.is_using_oauth_), | 24 is_using_oauth_(other.is_using_oauth_), |
| 25 auth_flow_(other.auth_flow_), | 25 auth_flow_(other.auth_flow_), |
| 26 user_type_(other.user_type_), | 26 user_type_(other.user_type_), |
| 27 public_session_locale_(other.public_session_locale_), | 27 public_session_locale_(other.public_session_locale_), |
| 28 public_session_input_method_(other.public_session_input_method_) { | 28 public_session_input_method_(other.public_session_input_method_), |
| 29 device_id_(other.device_id_) { |
| 29 } | 30 } |
| 30 | 31 |
| 31 UserContext::UserContext(const std::string& user_id) | 32 UserContext::UserContext(const std::string& user_id) |
| 32 : user_id_(login::CanonicalizeUserID(user_id)), | 33 : user_id_(login::CanonicalizeUserID(user_id)), |
| 33 is_using_oauth_(true), | 34 is_using_oauth_(true), |
| 34 auth_flow_(AUTH_FLOW_OFFLINE), | 35 auth_flow_(AUTH_FLOW_OFFLINE), |
| 35 user_type_(user_manager::USER_TYPE_REGULAR) { | 36 user_type_(user_manager::USER_TYPE_REGULAR) { |
| 36 } | 37 } |
| 37 | 38 |
| 38 UserContext::UserContext(user_manager::UserType user_type, | 39 UserContext::UserContext(user_manager::UserType user_type, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 device_id_ = device_id; | 179 device_id_ = device_id; |
| 179 } | 180 } |
| 180 | 181 |
| 181 void UserContext::ClearSecrets() { | 182 void UserContext::ClearSecrets() { |
| 182 key_.ClearSecret(); | 183 key_.ClearSecret(); |
| 183 auth_code_.clear(); | 184 auth_code_.clear(); |
| 184 refresh_token_.clear(); | 185 refresh_token_.clear(); |
| 185 } | 186 } |
| 186 | 187 |
| 187 } // namespace chromeos | 188 } // namespace chromeos |
| OLD | NEW |