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

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

Issue 1319073005: Make ThemeService not disable uninstalled themes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_build
Patch Set: Created 5 years, 3 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 | « no previous file | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 876985d5c60f0e824d6f34951ec60e25dc1b3c3d..ab0b6454b442ae67fd1a264798c2e45d3b9c24d6 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -389,7 +389,13 @@ void ThemeService::SetTheme(const Extension* extension) {
content::RecordAction(UserMetricsAction("Themes_Installed"));
if (previous_theme_id != kDefaultThemeID &&
- previous_theme_id != extension->id()) {
+ previous_theme_id != extension->id() &&
+ service->GetInstalledExtension(previous_theme_id)) {
+ // Do not disable the previous theme if it is already uninstalled. Sending
+ // NOTIFICATION_BROWSER_THEME_CHANGED causes the previous theme to be
+ // uninstalled when the notification causes the remaining infobar to close
+ // and does not open any new infobars. See crbug.com/468280.
+
// Disable the old theme.
service->DisableExtension(previous_theme_id,
extensions::Extension::DISABLE_USER_ACTION);
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698