summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_install_ui_default.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_install_ui_default.cc')
-rw-r--r--chrome/browser/extensions/extension_install_ui_default.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/extensions/extension_install_ui_default.cc b/chrome/browser/extensions/extension_install_ui_default.cc
index db426be..a3b0cda 100644
--- a/chrome/browser/extensions/extension_install_ui_default.cc
+++ b/chrome/browser/extensions/extension_install_ui_default.cc
@@ -44,13 +44,14 @@ bool disable_failure_ui_for_tests = false;
} // namespace
-ExtensionInstallUIDefault::ExtensionInstallUIDefault(Profile* profile)
- : profile_(profile),
+ExtensionInstallUIDefault::ExtensionInstallUIDefault(Browser* browser)
+ : browser_(browser),
skip_post_install_ui_(false),
previous_using_native_theme_(false),
use_app_installed_bubble_(false) {
// Remember the current theme in case the user presses undo.
- if (profile) {
+ if (browser) {
+ Profile* profile = browser->profile();
const Extension* previous_theme =
ThemeServiceFactory::GetThemeForProfile(profile);
if (previous_theme)
@@ -70,13 +71,13 @@ void ExtensionInstallUIDefault::OnInstallSuccess(const Extension* extension,
if (extension->is_theme()) {
ShowThemeInfoBar(previous_theme_id_, previous_using_native_theme_,
- extension, profile_);
+ extension, browser_->profile());
return;
}
// Extensions aren't enabled by default in incognito so we confirm
// the install in a normal window.
- Profile* current_profile = profile_->GetOriginalProfile();
+ Profile* current_profile = browser_->profile()->GetOriginalProfile();
Browser* browser = browser::FindOrCreateTabbedBrowser(current_profile);
if (browser->tab_count() == 0)
browser->AddBlankTab(true);
@@ -104,7 +105,7 @@ void ExtensionInstallUIDefault::OnInstallFailure(const string16& error) {
if (disable_failure_ui_for_tests || skip_post_install_ui_)
return;
- Browser* browser = browser::FindLastActiveWithProfile(profile_);
+ Browser* browser = browser::FindLastActiveWithProfile(browser_->profile());
browser::ShowMessageBox(browser ? browser->window()->GetNativeWindow() : NULL,
l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALL_FAILURE_TITLE), error,
browser::MESSAGE_BOX_TYPE_WARNING);
@@ -178,8 +179,8 @@ InfoBarDelegate* ExtensionInstallUIDefault::GetNewThemeInstalledInfoBarDelegate(
}
// static
-ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) {
- return new ExtensionInstallUIDefault(profile);
+ExtensionInstallUI* ExtensionInstallUI::Create(Browser* browser) {
+ return new ExtensionInstallUIDefault(browser);
}
// static