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

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

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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_default.cc
===================================================================
--- chrome/browser/extensions/extension_install_ui_default.cc (revision 145357)
+++ chrome/browser/extensions/extension_install_ui_default.cc (working copy)
@@ -87,15 +87,15 @@
} // namespace
-ExtensionInstallUIDefault::ExtensionInstallUIDefault(Browser* browser)
+ExtensionInstallUIDefault::ExtensionInstallUIDefault(Profile* profile)
: skip_post_install_ui_(false),
previous_using_native_theme_(false),
use_app_installed_bubble_(false) {
- browser_ = browser;
+ profile_ = profile;
- // Remember the current theme in case the user presses undo.
- if (browser) {
- Profile* profile = browser->profile();
+ // |profile_| can be NULL during tests.
+ if (profile_) {
+ // Remember the current theme in case the user presses undo.
const Extension* previous_theme =
ThemeServiceFactory::GetThemeForProfile(profile);
if (previous_theme)
@@ -115,13 +115,13 @@
if (extension->is_theme()) {
ShowThemeInfoBar(previous_theme_id_, previous_using_native_theme_,
- extension, browser_->profile());
+ extension, profile_);
return;
}
// Extensions aren't enabled by default in incognito so we confirm
// the install in a normal window.
- Profile* current_profile = browser_->profile()->GetOriginalProfile();
+ Profile* current_profile = profile_->GetOriginalProfile();
Browser* browser = browser::FindOrCreateTabbedBrowser(current_profile);
if (browser->tab_count() == 0)
browser->AddBlankTab(true);
@@ -149,7 +149,7 @@
if (disable_failure_ui_for_tests || skip_post_install_ui_)
return;
- Browser* browser = browser::FindLastActiveWithProfile(browser_->profile());
+ Browser* browser = browser::FindLastActiveWithProfile(profile_);
TabContents* tab_contents = chrome::GetActiveTabContents(browser);
if (!tab_contents)
return;
@@ -226,8 +226,8 @@
}
// static
-ExtensionInstallUI* ExtensionInstallUI::Create(Browser* browser) {
- return new ExtensionInstallUIDefault(browser);
+ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) {
+ return new ExtensionInstallUIDefault(profile);
}
// static
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_default.h ('k') | chrome/browser/extensions/extension_management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698