[email protected] | d66eac4 | 2014-07-14 23:48:30 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #include "components/user_manager/user_info_impl.h" | ||||
6 | |||||
7 | #include "base/logging.h" | ||||
8 | #include "base/strings/utf_string_conversions.h" | ||||
Alexander Alekseev | 3f09a8f | 2018-05-03 02:52:10 | [diff] [blame] | 9 | #include "components/account_id/account_id.h" |
alemate | bc19dbb | 2016-11-01 19:49:07 | [diff] [blame] | 10 | #include "components/user_manager/user_names.h" |
[email protected] | d66eac4 | 2014-07-14 23:48:30 | [diff] [blame] | 11 | |
12 | namespace user_manager { | ||||
13 | |||||
alemate | bc19dbb | 2016-11-01 19:49:07 | [diff] [blame] | 14 | UserInfoImpl::UserInfoImpl() : account_id_(StubAccountId()) {} |
[email protected] | d66eac4 | 2014-07-14 23:48:30 | [diff] [blame] | 15 | |
16 | UserInfoImpl::~UserInfoImpl() { | ||||
17 | } | ||||
18 | |||||
19 | base::string16 UserInfoImpl::GetDisplayName() const { | ||||
20 | return base::UTF8ToUTF16("stub-user"); | ||||
21 | } | ||||
22 | |||||
23 | base::string16 UserInfoImpl::GetGivenName() const { | ||||
24 | return base::UTF8ToUTF16("Stub"); | ||||
25 | } | ||||
26 | |||||
alemate | bc19dbb | 2016-11-01 19:49:07 | [diff] [blame] | 27 | std::string UserInfoImpl::GetDisplayEmail() const { |
28 | return account_id_.GetUserEmail(); // Migrated | ||||
[email protected] | d66eac4 | 2014-07-14 23:48:30 | [diff] [blame] | 29 | } |
30 | |||||
hcarmona | b1723ed3 | 2015-11-18 21:52:58 | [diff] [blame] | 31 | const AccountId& UserInfoImpl::GetAccountId() const { |
32 | return account_id_; | ||||
[email protected] | d66eac4 | 2014-07-14 23:48:30 | [diff] [blame] | 33 | } |
34 | |||||
35 | const gfx::ImageSkia& UserInfoImpl::GetImage() const { | ||||
36 | return user_image_; | ||||
37 | } | ||||
38 | |||||
39 | } // namespace user_manager |