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_; |