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/user_manager/user.h" | 5 #include "components/user_manager/user.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 private: | 133 private: |
134 DISALLOW_COPY_AND_ASSIGN(PublicAccountUser); | 134 DISALLOW_COPY_AND_ASSIGN(PublicAccountUser); |
135 }; | 135 }; |
136 | 136 |
137 User::User(const AccountId& account_id) | 137 User::User(const AccountId& account_id) |
138 : account_id_(account_id), user_image_(new UserImage) {} | 138 : account_id_(account_id), user_image_(new UserImage) {} |
139 | 139 |
140 User::~User() {} | 140 User::~User() {} |
141 | 141 |
142 std::string User::GetEmail() const { | 142 std::string User::GetDisplayEmail() const { |
143 return display_email(); | 143 return display_email(); |
144 } | 144 } |
145 | 145 |
146 base::string16 User::GetDisplayName() const { | 146 base::string16 User::GetDisplayName() const { |
147 // Fallback to the email account name in case display name haven't been set. | 147 // Fallback to the email account name in case display name haven't been set. |
148 return display_name_.empty() ? base::UTF8ToUTF16(GetAccountName(true)) | 148 return display_name_.empty() ? base::UTF8ToUTF16(GetAccountName(true)) |
149 : display_name_; | 149 : display_name_; |
150 } | 150 } |
151 | 151 |
152 base::string16 User::GetGivenName() const { | 152 base::string16 User::GetGivenName() const { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 case user_manager::USER_TYPE_KIOSK_APP: | 392 case user_manager::USER_TYPE_KIOSK_APP: |
393 case user_manager::USER_TYPE_ARC_KIOSK_APP: | 393 case user_manager::USER_TYPE_ARC_KIOSK_APP: |
394 return false; | 394 return false; |
395 default: | 395 default: |
396 NOTREACHED(); | 396 NOTREACHED(); |
397 } | 397 } |
398 return false; | 398 return false; |
399 } | 399 } |
400 | 400 |
401 } // namespace user_manager | 401 } // namespace user_manager |
OLD | NEW |