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

Unified Diff: chrome/browser/themes/theme_service.h

Issue 22755003: Reland: Chrome side work for allowing a user to revert to their previous theme without closing ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 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/themes/theme_service.h
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index 117844f787e5c9168463c76e849a7564d126ccbc..22abfdea308b3a0c7cc62d722f1a9a538619b754 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -135,8 +135,10 @@ class ThemeService : public base::NonThreadSafe,
// destroyed, uninstalls all themes that aren't the currently selected.
void OnInfobarDestroyed();
- // Remove preference values for themes that are no longer in use.
- void RemoveUnusedThemes();
+ // Uninstall theme extensions which are no longer in use. |ignore_infobars| is
+ // whether unused themes should be removed despite a theme infobar being
+ // visible.
+ void RemoveUnusedThemes(bool ignore_infobars);
// Returns the syncable service for syncing theme. The returned service is
// owned by |this| object.
@@ -190,14 +192,17 @@ class ThemeService : public base::NonThreadSafe,
private:
friend class theme_service_internal::ThemeServiceTest;
- // Replaces the current theme supplier with a new one and calls
- // StopUsingTheme() or StartUsingTheme() as appropriate.
- void SwapThemeSupplier(scoped_refptr<CustomThemeSupplier> theme_supplier);
+ // Called when the extension service is ready.
+ void OnExtensionServiceReady();
// Migrate the theme to the new theme pack schema by recreating the data pack
// from the extension.
void MigrateTheme();
+ // Replaces the current theme supplier with a new one and calls
+ // StopUsingTheme() or StartUsingTheme() as appropriate.
+ void SwapThemeSupplier(scoped_refptr<CustomThemeSupplier> theme_supplier);
+
// Saves the filename of the cached theme pack.
void SavePackName(const base::FilePath& pack_path);
@@ -244,6 +249,13 @@ class ThemeService : public base::NonThreadSafe,
scoped_refptr<CustomThemeSupplier> theme_supplier_;
+ // The id of the theme extension which has just been installed but has not
+ // been loaded yet. The theme extension with |installed_pending_load_id_| may
+ // never be loaded if the install is due to updating a disabled theme.
+ // |pending_install_id_| should be set to |kDefaultThemeID| if there are no
+ // recently installed theme extensions
+ std::string installed_pending_load_id_;
+
// The number of infobars currently displayed.
int number_of_infobars_;
« no previous file with comments | « chrome/browser/profile_resetter/profile_resetter_unittest.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698