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

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

Issue 141103007: Fixing valgrind problem with wallpaper animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12394ad3273e9ca33c22d644d9c39ad6a2bb2dbe..44c376d3baa0a08e8e82bd323f47708b74a8b445 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -702,8 +702,8 @@ void WallpaperManager::SetUserWallpaperNow(const std::string& email) {
void WallpaperManager::ScheduleSetUserWallpaper(const std::string& email,
bool delayed) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // Some unit tests come here without a UserManager.
- if (!UserManager::IsInitialized())
+ // Some unit tests come here without a UserManager or without a pref system.
+ if (!UserManager::IsInitialized() || !g_browser_process->local_state())
return;
// There is no visible background in kiosk mode.
if (UserManager::Get()->IsLoggedInAsKioskApp())
@@ -1036,9 +1036,7 @@ bool WallpaperManager::GetUserWallpaperInfo(const std::string& email,
WallpaperInfo* info){
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // Some unit tests come here with no browser local state attached.
- if (UserManager::Get()->IsUserNonCryptohomeDataEphemeral(email) ||
- !g_browser_process->local_state()) {
+ if (UserManager::Get()->IsUserNonCryptohomeDataEphemeral(email)) {
// Default to the values cached in memory.
*info = current_user_wallpaper_info_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698