From 32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 15 Jun 2012 21:50:01 +0000 Subject: Remove BrowserList::GetLastActive from extensions install dialog code by plumbing through the Browser window. In two places (file_manager_util.cc and download_crx_util.cc) there is no context so I left those with FindLastActiveWithProfile for now. BUG=129187 Review URL: https://chromiumcodereview.appspot.com/10548057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142489 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_disabled_ui.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'chrome/browser/extensions/extension_disabled_ui.cc') diff --git a/chrome/browser/extensions/extension_disabled_ui.cc b/chrome/browser/extensions/extension_disabled_ui.cc index 7a023a4..344a233 100644 --- a/chrome/browser/extensions/extension_disabled_ui.cc +++ b/chrome/browser/extensions/extension_disabled_ui.cc @@ -71,7 +71,7 @@ class ExtensionDisabledDialogDelegate : public ExtensionInstallPrompt::Delegate, public base::RefCountedThreadSafe { public: - ExtensionDisabledDialogDelegate(Profile* profile, + ExtensionDisabledDialogDelegate(Browser* browser, ExtensionService* service, const Extension* extension); @@ -92,13 +92,13 @@ class ExtensionDisabledDialogDelegate }; ExtensionDisabledDialogDelegate::ExtensionDisabledDialogDelegate( - Profile* profile, + Browser* browser, ExtensionService* service, const Extension* extension) : service_(service), extension_(extension) { AddRef(); // Balanced in Proceed or Abort. - install_ui_.reset(new ExtensionInstallPrompt(profile)); + install_ui_.reset(new ExtensionInstallPrompt(browser)); install_ui_->ConfirmReEnable(this, extension_); } @@ -256,8 +256,7 @@ void ExtensionDisabledGlobalError::OnBubbleViewDidClose(Browser* browser) { void ExtensionDisabledGlobalError::BubbleViewAcceptButtonPressed( Browser* browser) { - new ExtensionDisabledDialogDelegate(service_->profile(), service_, - extension_); + new ExtensionDisabledDialogDelegate(browser, service_, extension_); } void ExtensionDisabledGlobalError::BubbleViewCancelButtonPressed( @@ -318,10 +317,10 @@ void AddExtensionDisabledError(ExtensionService* service, AddGlobalError(new ExtensionDisabledGlobalError(service, extension)); } -void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile, +void ShowExtensionDisabledDialog(ExtensionService* service, Browser* browser, const Extension* extension) { // This object manages its own lifetime. - new ExtensionDisabledDialogDelegate(profile, service, extension); + new ExtensionDisabledDialogDelegate(browser, service, extension); } } // namespace extensions -- cgit v1.1