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

Side by Side Diff: chrome/browser/chromeos/login/user_manager.h

Issue 9703031: Retry landing "Enable users change desktop background image from settings page in Chromeos Aura bui… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge to trunk Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 // Called when the local state preferences is changed 30 // Called when the local state preferences is changed
31 virtual void LocalStateChanged(UserManager* user_manager) = 0; 31 virtual void LocalStateChanged(UserManager* user_manager) = 0;
32 32
33 protected: 33 protected:
34 virtual ~Observer() {} 34 virtual ~Observer() {}
35 }; 35 };
36 36
37 // A vector pref of the users who have logged into the device. 37 // A vector pref of the users who have logged into the device.
38 static const char kLoggedInUsers[]; 38 static const char kLoggedInUsers[];
39 39
40 // A dictionary that maps usernames to file paths to their wallpapers.
41 static const char kUserWallpapers[];
42
40 // A dictionary that maps usernames to file paths to their images. 43 // A dictionary that maps usernames to file paths to their images.
41 static const char kUserImages[]; 44 static const char kUserImages[];
42 45
43 // A dictionary that maps usernames to the displayed (non-canonical) emails. 46 // A dictionary that maps usernames to the displayed (non-canonical) emails.
44 static const char kUserDisplayEmail[]; 47 static const char kUserDisplayEmail[];
45 48
46 // A dictionary that maps usernames to OAuth token presence flag. 49 // A dictionary that maps usernames to OAuth token presence flag.
47 static const char kUserOAuthTokenStatus[]; 50 static const char kUserOAuthTokenStatus[];
48 51
49 // Returns a shared instance of a UserManager. Not thread-safe, should only be 52 // Returns a shared instance of a UserManager. Not thread-safe, should only be
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Ignored If there is no such user. 109 // Ignored If there is no such user.
107 virtual void SaveUserDisplayEmail(const std::string& username, 110 virtual void SaveUserDisplayEmail(const std::string& username,
108 const std::string& display_email) = 0; 111 const std::string& display_email) = 0;
109 112
110 // Returns the display email for user |username| if it is known (was 113 // Returns the display email for user |username| if it is known (was
111 // previously set by a |SaveUserDisplayEmail| call). 114 // previously set by a |SaveUserDisplayEmail| call).
112 // Otherwise, returns |username| itself. 115 // Otherwise, returns |username| itself.
113 virtual std::string GetUserDisplayEmail( 116 virtual std::string GetUserDisplayEmail(
114 const std::string& username) const = 0; 117 const std::string& username) const = 0;
115 118
119 // Returns the index of the default wallpapers saved in local state for user
120 // |username| if it is known (was previousely set by
121 // |SaveWallpaperToLocalState| call).
122 // Otherwise, returns default wallpaper index.
123 virtual int GetUserWallpaper(const std::string& username) = 0;
124
125 // Sets user wallpaper to the default wallpaper with index |wallpaper_index|,
126 // updates Local State.
127 virtual void SaveWallpaperDefaultIndex(const std::string& username,
128 int wallpaper_index) = 0;
129
116 // Sets user image to the default image with index |image_index|, sends 130 // Sets user image to the default image with index |image_index|, sends
117 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 131 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
118 virtual void SaveUserDefaultImageIndex(const std::string& username, 132 virtual void SaveUserDefaultImageIndex(const std::string& username,
119 int image_index) = 0; 133 int image_index) = 0;
120 134
121 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and 135 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and
122 // updates Local State. 136 // updates Local State.
123 virtual void SaveUserImage(const std::string& username, 137 virtual void SaveUserImage(const std::string& username,
124 const SkBitmap& image) = 0; 138 const SkBitmap& image) = 0;
125 139
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 virtual void NotifyLocalStateChanged() = 0; 180 virtual void NotifyLocalStateChanged() = 0;
167 181
168 // Returns the result of the last successful profile image download, if any. 182 // Returns the result of the last successful profile image download, if any.
169 // Otherwise, returns an empty bitmap. 183 // Otherwise, returns an empty bitmap.
170 virtual const SkBitmap& DownloadedProfileImage() const = 0; 184 virtual const SkBitmap& DownloadedProfileImage() const = 0;
171 }; 185 };
172 186
173 } // namespace chromeos 187 } // namespace chromeos
174 188
175 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 189 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.h ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698