Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: components/user_manager/user_info.h

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Rebased. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_H_ 5 #ifndef COMPONENTS_USER_MANAGER_USER_INFO_H_
6 #define COMPONENTS_USER_MANAGER_USER_INFO_H_ 6 #define COMPONENTS_USER_MANAGER_USER_INFO_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/user_manager/user_id.h"
12 #include "components/user_manager/user_manager_export.h" 11 #include "components/user_manager/user_manager_export.h"
13 12
13 class AccountId;
14
14 namespace gfx { 15 namespace gfx {
15 class ImageSkia; 16 class ImageSkia;
16 } 17 }
17 18
18 namespace user_manager { 19 namespace user_manager {
19 20
20 // A class that represents user related info. 21 // A class that represents user related info.
21 class USER_MANAGER_EXPORT UserInfo { 22 class USER_MANAGER_EXPORT UserInfo {
22 public: 23 public:
23 UserInfo(); 24 UserInfo();
24 virtual ~UserInfo(); 25 virtual ~UserInfo();
25 26
26 // Gets the display name for the user. 27 // Gets the display name for the user.
27 virtual base::string16 GetDisplayName() const = 0; 28 virtual base::string16 GetDisplayName() const = 0;
28 29
29 // Gets the given name of the user. 30 // Gets the given name of the user.
30 virtual base::string16 GetGivenName() const = 0; 31 virtual base::string16 GetGivenName() const = 0;
31 32
32 // Gets the display email address for the user. 33 // Gets the display email address for the user.
33 // The display email address might contains some periods in the email name 34 // The display email address might contains some periods in the email name
34 // as well as capitalized letters. For example: "Foo.Bar@mock.com". 35 // as well as capitalized letters. For example: "Foo.Bar@mock.com".
35 virtual std::string GetEmail() const = 0; 36 virtual std::string GetEmail() const = 0;
36 37
37 // Gets the user id (sanitized email address) for the user. 38 // Gets the user id (sanitized email address) for the user.
38 // The function would return something like "foobar@mock.com". 39 // The function would return something like "foobar@mock.com".
39 virtual UserID GetUserID() const = 0; 40 virtual AccountId GetUserID() const = 0;
stevenjb 2015/10/22 17:52:36 I know it's a PITA, but I really wish we would ren
achuithb 2015/10/23 00:08:52 +1
Alexander Alekseev 2015/10/23 09:11:24 Done.
Alexander Alekseev 2015/10/23 09:11:24 Done.
40 41
41 // Gets the avatar image for the user. 42 // Gets the avatar image for the user.
42 virtual const gfx::ImageSkia& GetImage() const = 0; 43 virtual const gfx::ImageSkia& GetImage() const = 0;
43 }; 44 };
44 45
45 } // namespace user_manager 46 } // namespace user_manager
46 47
47 #endif // COMPONENTS_USER_MANAGER_USER_INFO_H_ 48 #endif // COMPONENTS_USER_MANAGER_USER_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698