| 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_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 USER_IMAGE_INVALID = -3, | 53 USER_IMAGE_INVALID = -3, |
| 54 | 54 |
| 55 // Returned as |image_index| when user profile image is used as user image. | 55 // Returned as |image_index| when user profile image is used as user image. |
| 56 USER_IMAGE_PROFILE = -2, | 56 USER_IMAGE_PROFILE = -2, |
| 57 | 57 |
| 58 // Returned as |image_index| when user-selected file or photo is used as | 58 // Returned as |image_index| when user-selected file or photo is used as |
| 59 // user image. | 59 // user image. |
| 60 USER_IMAGE_EXTERNAL = -1, | 60 USER_IMAGE_EXTERNAL = -1, |
| 61 } UserImageType; | 61 } UserImageType; |
| 62 | 62 |
| 63 // This enum is used to define the buckets for an enumerated UMA histogram. |
| 64 // Hence, |
| 65 // (a) existing enumerated constants should never be deleted or reordered, |
| 66 // (b) new constants should only be appended at the end of the enumeration. |
| 63 enum WallpaperType { | 67 enum WallpaperType { |
| 64 /* DAILY = 0 */ // Removed. Do not re-use the id! | 68 /* DAILY = 0 */ // Removed. |
| 65 CUSTOMIZED = 1, // Selected by user. | 69 CUSTOMIZED = 1, // Selected by user. |
| 66 DEFAULT = 2, // Default. | 70 DEFAULT = 2, // Default. |
| 67 /* UNKNOWN = 3 */ // Removed. Do not re-use the id! | 71 /* UNKNOWN = 3 */ // Removed. |
| 68 ONLINE = 4, // WallpaperInfo.file denotes an URL. | 72 ONLINE = 4, // WallpaperInfo.location denotes an URL. |
| 69 POLICY = 5, // Controlled by policy, can't be changed by the user. | 73 POLICY = 5, // Controlled by policy, can't be changed by the user. |
| 70 WALLPAPER_TYPE_COUNT = 6 | 74 WALLPAPER_TYPE_COUNT = 6 |
| 71 }; | 75 }; |
| 72 | 76 |
| 73 // Returns the user type. | 77 // Returns the user type. |
| 74 virtual UserType GetType() const = 0; | 78 virtual UserType GetType() const = 0; |
| 75 | 79 |
| 76 // The email the user used to log in. | 80 // The email the user used to log in. |
| 77 const std::string& email() const { return email_; } | 81 const std::string& email() const { return email_; } |
| 78 | 82 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 267 |
| 264 DISALLOW_COPY_AND_ASSIGN(User); | 268 DISALLOW_COPY_AND_ASSIGN(User); |
| 265 }; | 269 }; |
| 266 | 270 |
| 267 // List of known users. | 271 // List of known users. |
| 268 typedef std::vector<User*> UserList; | 272 typedef std::vector<User*> UserList; |
| 269 | 273 |
| 270 } // namespace user_manager | 274 } // namespace user_manager |
| 271 | 275 |
| 272 #endif // COMPONENTS_USER_MANAGER_USER_H_ | 276 #endif // COMPONENTS_USER_MANAGER_USER_H_ |
| OLD | NEW |