Chromium Code Reviews| 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 // Returns the index of the default wallpapers saved in local state for user | |
| 103 // |username| if it is known (was previousely set by | |
| 104 // |SaveWallpaperToLocalState| call). | |
| 105 // Otherwise, returns default wallpaper index. | |
| 106 int GetUserWallpaper(const std::string& username); | |
| 107 | |
| 108 // Stores index to the user choosed defautl wallpaper in local state. | |
|
flackr
2012/03/06 17:16:49
Sets the user wallpaper to the default wallpaper w
bshe
2012/03/06 19:56:16
Done.
| |
| 109 void SaveWallpaperToLocalState(const std::string& username, | |
| 110 int wallpaper_index); | |
|
flackr
2012/03/06 17:16:49
As with SaveUserDefaultImageIndex below, call this
bshe
2012/03/06 19:56:16
Done.
| |
| 111 | |
| 102 // Sets user image to the default image with index |image_index|, sends | 112 // Sets user image to the default image with index |image_index|, sends |
| 103 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 113 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| 104 void SaveUserDefaultImageIndex(const std::string& username, int image_index); | 114 void SaveUserDefaultImageIndex(const std::string& username, int image_index); |
| 105 | 115 |
| 106 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and | 116 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and |
| 107 // updates Local State. | 117 // updates Local State. |
| 108 void SaveUserImage(const std::string& username, const SkBitmap& image); | 118 void SaveUserImage(const std::string& username, const SkBitmap& image); |
| 109 | 119 |
| 110 // Tries to load user image from disk; if successful, sets it for the user, | 120 // 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. | 121 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 | 327 |
| 318 // Data URL for |downloaded_profile_image_|. | 328 // Data URL for |downloaded_profile_image_|. |
| 319 std::string downloaded_profile_image_data_url_; | 329 std::string downloaded_profile_image_data_url_; |
| 320 | 330 |
| 321 DISALLOW_COPY_AND_ASSIGN(UserManager); | 331 DISALLOW_COPY_AND_ASSIGN(UserManager); |
| 322 }; | 332 }; |
| 323 | 333 |
| 324 } // namespace chromeos | 334 } // namespace chromeos |
| 325 | 335 |
| 326 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 336 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |