user_info_impl.cc 934 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include "components/user_manager/user_info_impl.h"
  5. #include "base/strings/utf_string_conversions.h"
  6. #include "components/account_id/account_id.h"
  7. #include "components/user_manager/user_names.h"
  8. namespace user_manager {
  9. UserInfoImpl::UserInfoImpl() : account_id_(StubAccountId()) {}
  10. UserInfoImpl::~UserInfoImpl() {
  11. }
  12. std::u16string UserInfoImpl::GetDisplayName() const {
  13. return u"stub-user";
  14. }
  15. std::u16string UserInfoImpl::GetGivenName() const {
  16. return u"Stub";
  17. }
  18. std::string UserInfoImpl::GetDisplayEmail() const {
  19. return account_id_.GetUserEmail(); // Migrated
  20. }
  21. const AccountId& UserInfoImpl::GetAccountId() const {
  22. return account_id_;
  23. }
  24. const gfx::ImageSkia& UserInfoImpl::GetImage() const {
  25. return user_image_;
  26. }
  27. } // namespace user_manager