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 #ifndef COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ |
6 #define COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "components/signin/core/account_id/account_id.h" | |
12 #include "components/user_manager/user_info.h" | 11 #include "components/user_manager/user_info.h" |
13 #include "components/user_manager/user_manager_export.h" | 12 #include "components/user_manager/user_manager_export.h" |
14 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
15 | 14 |
16 namespace user_manager { | 15 namespace user_manager { |
17 | 16 |
18 // Stub implementation of UserInfo interface. Used in tests. | 17 // Stub implementation of UserInfo interface. Used in tests. |
19 class USER_MANAGER_EXPORT UserInfoImpl : public UserInfo { | 18 class USER_MANAGER_EXPORT UserInfoImpl : public UserInfo { |
20 public: | 19 public: |
21 UserInfoImpl(); | 20 UserInfoImpl(); |
22 ~UserInfoImpl() override; | 21 ~UserInfoImpl() override; |
23 | 22 |
24 // UserInfo: | 23 // UserInfo: |
25 base::string16 GetDisplayName() const override; | 24 base::string16 GetDisplayName() const override; |
26 base::string16 GetGivenName() const override; | 25 base::string16 GetGivenName() const override; |
27 std::string GetEmail() const override; | 26 std::string GetEmail() const override; |
28 const AccountId& GetAccountId() const override; | 27 AccountId GetAccountId() const override; |
29 const gfx::ImageSkia& GetImage() const override; | 28 const gfx::ImageSkia& GetImage() const override; |
30 | 29 |
31 private: | 30 private: |
32 const AccountId account_id_; | |
33 gfx::ImageSkia user_image_; | 31 gfx::ImageSkia user_image_; |
34 | 32 |
35 DISALLOW_COPY_AND_ASSIGN(UserInfoImpl); | 33 DISALLOW_COPY_AND_ASSIGN(UserInfoImpl); |
36 }; | 34 }; |
37 | 35 |
38 } // namespace user_manager | 36 } // namespace user_manager |
39 | 37 |
40 #endif // COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ | 38 #endif // COMPONENTS_USER_MANAGER_USER_INFO_IMPL_H_ |
OLD | NEW |