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

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: Ivan's review 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..a116f6b03005a670b585a22618449a367f4b94c6 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.
- void SaveUserWallpaperProperties(const std::string& email,
- User::WallpaperType type,
- int index);
+ // When |is_persistent| is false, changes are kept in memory only.
+ void SetUserWallpaperProperties(const std::string& email,
+ User::WallpaperType type,
+ 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,11 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
base::WeakPtr<WallpaperDelegate> delegate,
const UserImage& wallpaper);
+ // Whether wallpaper data should be persisted for user |email|.
+ // Note: this function can not be called in SetUserWallpaperProperties. 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