| Index: chrome/browser/chromeos/login/wallpaper_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| index 14cfbf3c22b0b5206cf5ea356b61a9500154d361..9c62567b5e8ebba223ccc35006079e52b4838459 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| @@ -289,8 +289,8 @@ void WallpaperManager::TestApi::SetWallpaperCache(const std::string& user_id,
|
| wallpaper_manager_->wallpaper_cache_[user_id] = image;
|
| }
|
|
|
| -void WallpaperManager::TestApi::ClearWallpaperCache() {
|
| - wallpaper_manager_->ClearWallpaperCache();
|
| +void WallpaperManager::TestApi::ClearDisposableWallpaperCache() {
|
| + wallpaper_manager_->ClearDisposableWallpaperCache();
|
| }
|
|
|
| // static
|
| @@ -370,7 +370,7 @@ void WallpaperManager::EnsureLoggedInUserWallpaperLoaded() {
|
| SetUserWallpaperNow(UserManager::Get()->GetLoggedInUser()->email());
|
| }
|
|
|
| -void WallpaperManager::ClearWallpaperCache() {
|
| +void WallpaperManager::ClearDisposableWallpaperCache() {
|
| // Cancel callback for previous cache requests.
|
| weak_factory_.InvalidateWeakPtrs();
|
| if (!UserManager::IsMultipleProfilesAllowed()) {
|
| @@ -467,7 +467,7 @@ void WallpaperManager::Observe(int type,
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| switch (type) {
|
| case chrome::NOTIFICATION_LOGIN_USER_CHANGED: {
|
| - ClearWallpaperCache();
|
| + ClearDisposableWallpaperCache();
|
| BrowserThread::PostDelayedTask(
|
| BrowserThread::UI,
|
| FROM_HERE,
|
| @@ -828,8 +828,9 @@ void WallpaperManager::SetWallpaperFromImageSkia(
|
| }
|
| }
|
|
|
| -void WallpaperManager::UpdateWallpaper() {
|
| - ClearWallpaperCache();
|
| +void WallpaperManager::UpdateWallpaper(bool clear_cache) {
|
| + if (clear_cache)
|
| + wallpaper_cache_.clear();
|
| current_wallpaper_path_.clear();
|
| // For GAIA login flow, the last_selected_user_ may not be set before user
|
| // login. If UpdateWallpaper is called at GAIA login screen, no wallpaper will
|
|
|