user_info.h revision 116680a4aac90f2aa7413d9095a592090648e557
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#ifndef COMPONENTS_USER_MANAGER_USER_INFO_H_ 6#define COMPONENTS_USER_MANAGER_USER_INFO_H_ 7 8#include <string> 9 10#include "base/strings/string16.h" 11#include "components/user_manager/user_manager_export.h" 12 13namespace gfx { 14class ImageSkia; 15} 16 17namespace user_manager { 18 19// A class that represents user related info. 20class USER_MANAGER_EXPORT UserInfo { 21 public: 22 UserInfo(); 23 virtual ~UserInfo(); 24 25 // Gets the display name for the user. 26 virtual base::string16 GetDisplayName() const = 0; 27 28 // Gets the given name of the user. 29 virtual base::string16 GetGivenName() const = 0; 30 31 // Gets the display email address for the user. 32 // The display email address might contains some periods in the email name 33 // as well as capitalized letters. For example: "Foo.Bar@mock.com". 34 virtual std::string GetEmail() const = 0; 35 36 // Gets the user id (sanitized email address) for the user. 37 // The function would return something like "foobar@mock.com". 38 virtual std::string GetUserID() const = 0; 39 40 // Gets the avatar image for the user. 41 virtual const gfx::ImageSkia& GetImage() const = 0; 42}; 43 44} // namespace user_manager 45 46#endif // COMPONENTS_USER_MANAGER_USER_INFO_H_ 47