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

Unified Diff: chrome/browser/extensions/extension_install_ui.cc

Issue 165373: Merge 23055 - Make the theme install infobar have an 'undo' button instead... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 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/extensions/extension_install_ui.cc
===================================================================
--- chrome/browser/extensions/extension_install_ui.cc (revision 23160)
+++ chrome/browser/extensions/extension_install_ui.cc (working copy)
@@ -37,6 +37,11 @@
// immediately installed, and then we show an infobar (see OnInstallSuccess)
// to allow the user to revert if they don't like it.
if (extension->IsTheme()) {
+ // Remember the current theme in case the user pressed undo.
+ Extension* previous_theme = profile_->GetTheme();
+ if (previous_theme)
+ previous_theme_id_ = previous_theme->id();
+
installer->ContinueInstall();
return;
}
@@ -98,8 +103,8 @@
ShowThemeInfoBar(extension);
}
-void ExtensionInstallUI::ShowThemeInfoBar(Extension* extension) {
- if (!extension->IsTheme())
+void ExtensionInstallUI::ShowThemeInfoBar(Extension* new_theme) {
+ if (!new_theme->IsTheme())
return;
Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
@@ -122,7 +127,7 @@
// Then either replace that old one or add a new one.
InfoBarDelegate* new_delegate = new ThemePreviewInfobarDelegate(tab_contents,
- extension->name());
+ new_theme->name(), previous_theme_id_);
if (old_delegate)
tab_contents->ReplaceInfoBar(old_delegate, new_delegate);
Property changes on: chrome\browser\extensions\extension_install_ui.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/extensions/extension_install_ui.cc:r23055
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.h ('k') | chrome/browser/extensions/theme_preview_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698