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_info_impl.h" | 5 #include "components/user_manager/user_info_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "components/signin/core/account_id/account_id.h" | |
10 | 9 |
11 namespace user_manager { | 10 namespace user_manager { |
12 | 11 |
13 UserInfoImpl::UserInfoImpl() { | 12 UserInfoImpl::UserInfoImpl() { |
14 } | 13 } |
15 | 14 |
16 UserInfoImpl::~UserInfoImpl() { | 15 UserInfoImpl::~UserInfoImpl() { |
17 } | 16 } |
18 | 17 |
19 base::string16 UserInfoImpl::GetDisplayName() const { | 18 base::string16 UserInfoImpl::GetDisplayName() const { |
20 return base::UTF8ToUTF16("stub-user"); | 19 return base::UTF8ToUTF16("stub-user"); |
21 } | 20 } |
22 | 21 |
23 base::string16 UserInfoImpl::GetGivenName() const { | 22 base::string16 UserInfoImpl::GetGivenName() const { |
24 return base::UTF8ToUTF16("Stub"); | 23 return base::UTF8ToUTF16("Stub"); |
25 } | 24 } |
26 | 25 |
27 std::string UserInfoImpl::GetEmail() const { | 26 std::string UserInfoImpl::GetEmail() const { |
28 return "stub-user@domain.com"; | 27 return "stub-user@domain.com"; |
29 } | 28 } |
30 | 29 |
31 AccountId UserInfoImpl::GetAccountId() const { | 30 std::string UserInfoImpl::GetUserID() const { |
32 return AccountId::FromUserEmail(GetEmail()); | 31 return GetEmail(); |
33 } | 32 } |
34 | 33 |
35 const gfx::ImageSkia& UserInfoImpl::GetImage() const { | 34 const gfx::ImageSkia& UserInfoImpl::GetImage() const { |
36 return user_image_; | 35 return user_image_; |
37 } | 36 } |
38 | 37 |
39 } // namespace user_manager | 38 } // namespace user_manager |
OLD | NEW |