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

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

Issue 11968044: Fix login visual hitch on chromebook (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some unit and browser tests Created 7 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
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 7e6c375852630e83ba564f1d48306bad56a1bb4d..6d92a2711086b5b1c1686e44b9c8018a46d4f59c 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.h
+++ b/chrome/browser/chromeos/login/wallpaper_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -63,12 +63,16 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
static WallpaperManager* Get();
WallpaperManager();
+ virtual ~WallpaperManager();
+
+ // Indicates imminent shutdown, allowing the WallpaperManager to remove any
+ // observers it has registered.
+ void Shutdown();
// Registers wallpaper manager preferences.
static void RegisterPrefs(PrefServiceSimple* local_state);
bshe 2013/01/23 16:08:34 Add this function back because some tests (unit te
Nikita (slow) 2013/01/23 16:28:17 Should they call shutdown instead?
bshe 2013/01/23 17:11:45 We can explicitly call the shutdown in the tear do
Nikita (slow) 2013/01/24 12:03:26 I think that shutdown should be called in tests, i
bshe 2013/01/24 14:56:54 Sorry. Just to be clear, do you want me to call th
Nikita (slow) 2013/01/24 15:39:00 Also you'll have DCHECK failing because shutdown w
bshe 2013/01/24 16:25:09 Good point on the DCHECK fail. And yes they are br
- // Adds PowerManagerClient and TimeZoneSettings observers. It needs to be
- // added after PowerManagerClient has been initialized.
+ // Adds PowerManagerClient, TimeZoneSettings and CrosSettings observers.
void AddObservers();
// Loads wallpaper asynchronously if the current wallpaper is not the
@@ -158,8 +162,6 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
friend class WallpaperManagerBrowserTest;
typedef std::map<std::string, gfx::ImageSkia> CustomWallpaperMap;
- virtual ~WallpaperManager();
-
// The number of wallpapers have loaded. For test only.
int loaded_wallpapers() const { return loaded_wallpapers_; }
@@ -267,6 +269,9 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
bool update_wallpaper,
const FilePath& wallpaper_path);
+ // True if Shutdown function get called.
+ bool called_shutdown_;
+
// The number of loaded wallpapers.
int loaded_wallpapers_;

Powered by Google App Engine
This is Rietveld 408576698