summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 17:32:27 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 17:32:27 +0000
commit6de9d86c4d3a610ddc9520a32d9969dbe445867e (patch)
tree945c665c4d0773027d37a91aabedc9a0f03de641 /chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc
parent4e1c6b2efb7d40ebc99ec7448503f7652212ddf6 (diff)
downloadchromium_src-6de9d86c4d3a610ddc9520a32d9969dbe445867e.zip
chromium_src-6de9d86c4d3a610ddc9520a32d9969dbe445867e.tar.gz
chromium_src-6de9d86c4d3a610ddc9520a32d9969dbe445867e.tar.bz2
Uninstall themes after the undo infobar goes away.
We don't hold a pointer to the Extension in ThemeInstalledInfobarDelegate because it can become invalid. Instead we use the id to uninstall if the extension exists at infobar close time. Also keep the code for deleting themes on shutdown to clean up old users and because a crash could leave themes hanging around. BUG=25832 Review URL: http://codereview.chromium.org/343027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc')
-rw-r--r--chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc b/chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc
index f964ca4..efca805 100644
--- a/chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/gtk_theme_installed_infobar_delegate.cc
@@ -8,14 +8,16 @@
GtkThemeInstalledInfoBarDelegate::GtkThemeInstalledInfoBarDelegate(
TabContents* tab_contents,
- const std::string& name,
- const std::string& previous_theme,
+ const Extension* new_theme,
+ const std::string& previous_theme_id,
bool previous_use_gtk_theme)
- : ThemeInstalledInfoBarDelegate(tab_contents, name, previous_theme),
+ : ThemeInstalledInfoBarDelegate(tab_contents, new_theme, previous_theme_id),
previous_use_gtk_theme_(previous_use_gtk_theme) {
}
bool GtkThemeInstalledInfoBarDelegate::Cancel() {
+ was_canceled_ = true;
+
if (previous_use_gtk_theme_) {
profile()->SetNativeTheme();
return true;