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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.h

Issue 10829381: Remove call to UserManager::Get when initializing UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/wallpaper_manager.h
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.h b/chrome/browser/chromeos/login/wallpaper_manager.h
index a47e2bef843711938e49671243607c2bb867d240..da585720630ddd71d33d640cafdbab75d2e15c0a 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.h
+++ b/chrome/browser/chromeos/login/wallpaper_manager.h
@@ -91,13 +91,15 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
base::WeakPtr<WallpaperDelegate> delegate);
// Set |email|'s wallpaper |type|, |index| and local date to local state.
+ // When |is_persistent| is false, changes are kept in memory only.
void SaveUserWallpaperProperties(const std::string& email,
Ivan Korotkov 2012/08/17 19:10:57 Let's rename it to Set... because Save... already
bshe 2012/08/17 19:21:36 Done.
User::WallpaperType type,
- int index);
+ int index,
+ bool is_persistent);
// Sets one of the default wallpapers for the specified user and saves this
// settings in local state.
- void SetInitialUserWallpaper(const std::string& username);
+ void SetInitialUserWallpaper(const std::string& username, bool is_persistent);
// Saves |username| selected wallpaper information to local state.
void SaveUserWallpaperInfo(const std::string& username,
@@ -185,6 +187,13 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
base::WeakPtr<WallpaperDelegate> delegate,
const UserImage& wallpaper);
+ // Returns flase if current logged in user is ephemeral and |email| is the
+ // email of current logged in user. We should not persist data for ephemeral
Ivan Korotkov 2012/08/17 19:10:57 Please rephrase this to what the function actually
bshe 2012/08/17 19:21:36 Done.
+ // user.
+ // Note: this function can not be called in SaveUserWallpaperProperties. It
+ // will create a deadlock. (issue 142440)
+ bool ShouldPersistDataForUser(const std::string& email);
+
// Sets wallpaper to image in |user_image| with |layout|.
void OnWallpaperLoaded(ash::WallpaperLayout layout,
const UserImage& user_image);
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | chrome/browser/chromeos/login/wallpaper_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698