Index: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc |
index 47ec5ae0db9e551f3d65edaa6efa8f829fde4683..f7be46b675b259b4150393802689b09cfecb4917 100644 |
--- a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc |
+++ b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc |
@@ -14,6 +14,7 @@ |
#include "base/string_util.h" |
#include "base/values.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
+#include "chrome/browser/chromeos/login/wallpaper_manager.h" |
#include "chrome/browser/ui/browser_finder.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/chrome_select_file_policy.h" |
@@ -101,7 +102,7 @@ void SetWallpaperOptionsHandler::FileSelected(const FilePath& path, |
UserManager* user_manager = UserManager::Get(); |
// Default wallpaper layout is CENTER_CROPPED. |
- user_manager->SaveUserWallpaperFromFile( |
+ WallpaperManager::Get()->SetUserWallpaperFromFile( |
user_manager->GetLoggedInUser().email(), path, ash::CENTER_CROPPED, |
weak_factory_.GetWeakPtr()); |
web_ui()->CallJavascriptFunction("SetWallpaperOptions.didSelectFile"); |
@@ -161,7 +162,8 @@ void SetWallpaperOptionsHandler::HandlePageShown(const base::ListValue* args) { |
User::WallpaperType type; |
int index; |
base::Time date; |
- UserManager::Get()->GetLoggedInUserWallpaperProperties(&type, &index, &date); |
+ WallpaperManager::Get()->GetLoggedInUserWallpaperProperties(&type, &index, |
Ivan Korotkov
2012/07/31 21:18:16
Maybe move all arguments to the next line?
bshe
2012/08/01 15:07:35
Done.
|
+ &date); |
if (type == User::DAILY && date != base::Time::Now().LocalMidnight()) { |
index = ash::GetNextWallpaperIndex(index); |
UserManager::Get()->SaveLoggedInUserWallpaperProperties(User::DAILY, |
@@ -235,7 +237,8 @@ void SetWallpaperOptionsHandler::HandleDailyWallpaper(const ListValue* args) { |
User::WallpaperType type; |
int index; |
base::Time date; |
- UserManager::Get()->GetLoggedInUserWallpaperProperties(&type, &index, &date); |
+ WallpaperManager::Get()->GetLoggedInUserWallpaperProperties(&type, &index, |
+ &date); |
Ivan Korotkov
2012/07/31 21:18:16
Ditto
bshe
2012/08/01 15:07:35
Done.
|
if (date != base::Time::Now().LocalMidnight()) |
index = ash::GetNextWallpaperIndex(index); |
UserManager::Get()->SaveLoggedInUserWallpaperProperties(User::DAILY, index); |