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

Unified Diff: ash/desktop_background/desktop_background_resources.cc

Issue 10207030: Asynchronously load wallpapers when user pod is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 7 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 | « ash/desktop_background/desktop_background_resources.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_resources.cc
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc
index f53ac63fc4837c32b2c47b4cc9ccc68a2fb94906..5b7d07fb2aead40447dc17815c752472ddb336fe 100644
--- a/ash/desktop_background/desktop_background_resources.cc
+++ b/ash/desktop_background/desktop_background_resources.cc
@@ -231,7 +231,10 @@ const int kInvalidWallpaperIndex = -1;
const int kDefaultWallpaperIndex = 16; // IDR_AURA_WALLPAPERS_3_URBAN0
const int kGuestWallpaperIndex = 26; // IDR_AURA_WALLPAPERS_5_GRADIENT6
#else
-const int kDefaultWallpaperIndex = 0;
+// Set default wallpaper to the grey background for faster wallpaper loading
+// time in browser tests. Otherwise, some of the tests will finish before
+// wallpaper loaded and cause crashes.
+const int kDefaultWallpaperIndex = 6; // IDR_AURA_WALLPAPERS_5_GRADIENT5
const int kGuestWallpaperIndex = kDefaultWallpaperIndex;
#endif
@@ -257,13 +260,8 @@ int GetWallpaperCount() {
return kDefaultWallpaperCount;
}
-const SkBitmap& GetWallpaper(int index) {
- DCHECK(index >= 0 && index < kDefaultWallpaperCount);
- return *ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- kDefaultWallpapers[index].id).ToSkBitmap();
-}
-
const WallpaperInfo& GetWallpaperInfo(int index) {
+ DCHECK(index >= 0 && index < kDefaultWallpaperCount);
return kDefaultWallpapers[index];
}
« no previous file with comments | « ash/desktop_background/desktop_background_resources.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698