blob: ab1ac117c0b18902ac6f78bb9d626b31e7ab120f [file] [log] [blame]
[email protected]d66eac42014-07-14 23:48:301// 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 Alekseev3f09a8f2018-05-03 02:52:109#include "components/account_id/account_id.h"
alematebc19dbb2016-11-01 19:49:0710#include "components/user_manager/user_names.h"
[email protected]d66eac42014-07-14 23:48:3011
12namespace user_manager {
13
alematebc19dbb2016-11-01 19:49:0714UserInfoImpl::UserInfoImpl() : account_id_(StubAccountId()) {}
[email protected]d66eac42014-07-14 23:48:3015
16UserInfoImpl::~UserInfoImpl() {
17}
18
19base::string16 UserInfoImpl::GetDisplayName() const {
20 return base::UTF8ToUTF16("stub-user");
21}
22
23base::string16 UserInfoImpl::GetGivenName() const {
24 return base::UTF8ToUTF16("Stub");
25}
26
alematebc19dbb2016-11-01 19:49:0727std::string UserInfoImpl::GetDisplayEmail() const {
28 return account_id_.GetUserEmail(); // Migrated
[email protected]d66eac42014-07-14 23:48:3029}
30
hcarmonab1723ed32015-11-18 21:52:5831const AccountId& UserInfoImpl::GetAccountId() const {
32 return account_id_;
[email protected]d66eac42014-07-14 23:48:3033}
34
35const gfx::ImageSkia& UserInfoImpl::GetImage() const {
36 return user_image_;
37}
38
39} // namespace user_manager