| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Save user's displayed (non-canonical) email in local state preferences. | 92 // Save user's displayed (non-canonical) email in local state preferences. |
| 93 // Ignored If there is no such user. | 93 // Ignored If there is no such user. |
| 94 void SaveUserDisplayEmail(const std::string& username, | 94 void SaveUserDisplayEmail(const std::string& username, |
| 95 const std::string& display_email); | 95 const std::string& display_email); |
| 96 | 96 |
| 97 // Returns the display email for user |username| if it is known (was | 97 // Returns the display email for user |username| if it is known (was |
| 98 // previously set by a |SaveUserDisplayEmail| call). | 98 // previously set by a |SaveUserDisplayEmail| call). |
| 99 // Otherwise, returns |username| itself. | 99 // Otherwise, returns |username| itself. |
| 100 std::string GetUserDisplayEmail(const std::string& username) const; | 100 std::string GetUserDisplayEmail(const std::string& username) const; |
| 101 | 101 |
| 102 int GetUserWallpaper(const std::string& username); |
| 103 void SetUserWallpaper(const std::string& username, |
| 104 int wallpaper_index); |
| 105 |
| 102 // Sets user image to the default image with index |image_index|, sends | 106 // Sets user image to the default image with index |image_index|, sends |
| 103 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 107 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| 104 void SaveUserDefaultImageIndex(const std::string& username, int image_index); | 108 void SaveUserDefaultImageIndex(const std::string& username, int image_index); |
| 105 | 109 |
| 106 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and | 110 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and |
| 107 // updates Local State. | 111 // updates Local State. |
| 108 void SaveUserImage(const std::string& username, const SkBitmap& image); | 112 void SaveUserImage(const std::string& username, const SkBitmap& image); |
| 109 | 113 |
| 110 // Tries to load user image from disk; if successful, sets it for the user, | 114 // Tries to load user image from disk; if successful, sets it for the user, |
| 111 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 115 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 321 |
| 318 // Data URL for |downloaded_profile_image_|. | 322 // Data URL for |downloaded_profile_image_|. |
| 319 std::string downloaded_profile_image_data_url_; | 323 std::string downloaded_profile_image_data_url_; |
| 320 | 324 |
| 321 DISALLOW_COPY_AND_ASSIGN(UserManager); | 325 DISALLOW_COPY_AND_ASSIGN(UserManager); |
| 322 }; | 326 }; |
| 323 | 327 |
| 324 } // namespace chromeos | 328 } // namespace chromeos |
| 325 | 329 |
| 326 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 330 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |