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

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

Issue 253833006: Add browser test for CustomizationWallpaperDownloader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 6 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
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 2a5538e1aa25e394d003ead249c99f6cbd9aa13e..fd73551552290545ab7a85c9bb3c1bace8355b3b 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.h
+++ b/chrome/browser/chromeos/login/wallpaper_manager.h
@@ -121,6 +121,7 @@ class WallpaperManager: public content::NotificationObserver {
virtual ~Observer() {}
virtual void OnWallpaperAnimationFinished(const std::string& user_id) = 0;
virtual void OnUpdateWallpaperForTesting() {}
+ virtual void OnPendingListEmptyForTesting() {}
};
// This is "wallpaper either scheduled to load, or loading right now".
@@ -343,6 +344,9 @@ class WallpaperManager: public content::NotificationObserver {
const base::FilePath& downloaded_file,
const base::FilePath& resized_directory);
+ // Returns queue size.
+ size_t GetPendingListSizeForTesting() const;
+
private:
friend class TestApi;
friend class WallpaperManagerBrowserTest;
@@ -482,6 +486,9 @@ class WallpaperManager: public content::NotificationObserver {
PendingWallpaper* GetPendingWallpaper(const std::string& user_id,
bool delayed);
+ // This is called by PendingWallpaper when load is finished.
+ void RemovePendingWallpaperFromList(PendingWallpaper* pending);
+
// Calculate delay for next wallpaper load.
// It is usually average wallpaper load time.
// If last wallpaper load happened long ago, timeout should be reduced by

Powered by Google App Engine
This is Rietveld 408576698