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