Upload upstream chromium 67.0.3396
[platform/framework/web/chromium-efl.git] / components / user_manager / user_info_impl.cc
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"
9 #include "components/signin/core/account_id/account_id.h"
10 #include "components/user_manager/user_names.h"
11
12 namespace user_manager {
13
14 UserInfoImpl::UserInfoImpl() : account_id_(StubAccountId()) {}
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
27 std::string UserInfoImpl::GetDisplayEmail() const {
28   return account_id_.GetUserEmail();  // Migrated
29 }
30
31 const AccountId& UserInfoImpl::GetAccountId() const {
32   return account_id_;
33 }
34
35 const gfx::ImageSkia& UserInfoImpl::GetImage() const {
36   return user_image_;
37 }
38
39 }  // namespace user_manager