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 182a357d34ce9c1760d2a67d5bee9d5dd703cb1a..5200f707925f53fb3e923b39b6d072059431c3f7 100644 |
--- a/chrome/browser/chromeos/login/wallpaper_manager.h |
+++ b/chrome/browser/chromeos/login/wallpaper_manager.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include "ash/desktop_background/desktop_background_resources.h" |
+#include "base/file_path.h" |
#include "base/memory/ref_counted_memory.h" |
#include "base/memory/weak_ptr.h" |
#include "base/time.h" |
@@ -16,7 +17,6 @@ |
#include "chrome/browser/chromeos/login/user_image.h" |
#include "chrome/browser/chromeos/login/user_image_loader.h" |
#include "chrome/browser/chromeos/system/timezone_settings.h" |
-#include "chrome/browser/ui/webui/options/chromeos/set_wallpaper_options_handler.h" |
#include "chromeos/dbus/power_manager_client.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -63,13 +63,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
// added after PowerManagerClient initialized. |
void AddObservers(); |
- // Migrate the old wallpaper index to a new wallpaper structure for all users |
- // in |users|. |
- // The new wallpaper structure is: |
- // { WallpaperType: DAILY|CUSTOMIZED|DEFAULT, |
- // index: index of the default wallpapers } |
- void MigrateWallpaperData(const UserList& users); |
- |
// Loads wallpaper asynchronously if the current wallpaper is not the |
// wallpaper of logged in user. |
void EnsureLoggedInUserWallpaperLoaded(); |
@@ -93,11 +86,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
// Gets the thumbnail of custom wallpaper from cache. |
gfx::ImageSkia GetCustomWallpaperThumbnail(const std::string& email); |
- // Gets wallpaper properties of logged in user. |
- void GetLoggedInUserWallpaperProperties(User::WallpaperType* type, |
- int* index, |
- base::Time* last_modification_date); |
- |
// Gets wallpaper information of logged in user. |
bool GetLoggedInUserWallpaperInfo(WallpaperInfo* info); |
@@ -132,23 +120,8 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
void SetCustomWallpaper(const std::string& username, |
ash::WallpaperLayout layout, |
User::WallpaperType type, |
- base::WeakPtr<WallpaperDelegate> delegate, |
const UserImage& wallpaper); |
- // Tries to load user image from disk; if successful, sets it for the user, |
- // and updates Local State. |
- void SetUserWallpaperFromFile(const std::string& username, |
- const FilePath& path, |
- ash::WallpaperLayout layout, |
- base::WeakPtr<WallpaperDelegate> delegate); |
- |
- // Sets selected wallpaper properties for |username| and saves it to Local |
- // State if |is_persistent| is true. |
- void SetUserWallpaperProperties(const std::string& email, |
- User::WallpaperType type, |
- int index, |
- bool is_persistent); |
- |
// Sets wallpaper to default wallpaper at |index|. |
void SetDefaultWallpaper(int index); |
@@ -212,6 +185,9 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
void CacheThumbnail(const std::string& email, |
scoped_ptr<gfx::ImageSkia> wallpaper); |
+ // Clears all obsolete wallpaper prefs from old version wallpaper pickers. |
+ void ClearObsoleteWallpaperPrefs(); |
+ |
// Deletes a list of wallpaper files in |file_list|. |
void DeleteWallpaperInList(const std::vector<FilePath>& file_list); |
@@ -224,10 +200,9 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
const WallpaperInfo& info, |
bool update_wallpaper); |
- // Generates a 128x80 thumbnail and notifies delegate when ready. |
+ // Generates a 128x80 thumbnail. |
void GenerateUserWallpaperThumbnail(const std::string& email, |
User::WallpaperType type, |
- base::WeakPtr<WallpaperDelegate> delegate, |
const gfx::ImageSkia& wallpaper); |
// Gets |email|'s custom wallpaper at |wallpaper_path|. Falls back on original |
@@ -242,21 +217,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
// false if wallpaper information is not found. |
bool GetUserWallpaperInfo(const std::string& email, WallpaperInfo* info); |
- // Gets wallpaper |type|, |index| and |last_modification_date| of |email| |
- // from local state. |
- void GetUserWallpaperProperties(const std::string& email, |
- User::WallpaperType* type, |
- int* index, |
- base::Time* last_modification_date); |
- |
- // Copy |email| selected built-in wallpapers (high and low resolution) in |
- // ChromeOS image binary to local files on disk. Also converts the wallpaper |
- // properties correspond to the built-in wallpapers to the new wallpaper info. |
- void MigrateBuiltInWallpaper(const std::string& email); |
- |
- // Updates the custom wallpaper thumbnail in wallpaper picker UI. |
- void OnThumbnailUpdated(base::WeakPtr<WallpaperDelegate> delegate); |
- |
// Sets wallpaper to the decoded wallpaper if |update_wallpaper| is true. |
// Otherwise, cache wallpaper to memory if not logged in. |
void OnWallpaperDecoded(const std::string& email, |
@@ -274,7 +234,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
void ProcessCustomWallpaper(const std::string& email, |
bool persistent, |
const WallpaperInfo& info, |
- base::WeakPtr<WallpaperDelegate> delegate, |
scoped_ptr<gfx::ImageSkia> image, |
const UserImage::RawImage& raw_image); |
@@ -333,12 +292,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer, |
// Loads user wallpaper from its file. |
scoped_refptr<UserImageLoader> wallpaper_loader_; |
- // Logged-in user wallpaper type. |
- User::WallpaperType current_user_wallpaper_type_; |
- |
- // Logged-in user wallpaper index. |
- int current_user_wallpaper_index_; |
- |
// Logged-in user wallpaper information. |
WallpaperInfo current_user_wallpaper_info_; |