summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/extensions/install_extension_handler.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 21:50:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-15 21:50:01 +0000
commit32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0 (patch)
treec7e59d81962c173d61083003c07819c2805fd042 /chrome/browser/ui/webui/extensions/install_extension_handler.cc
parent080245fa243e0c04ccea332660d3058f710a090c (diff)
downloadchromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.zip
chromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.tar.gz
chromium_src-32fc4ff7d286f7a6ee80d969672cdadaa8d3e8d0.tar.bz2
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
Diffstat (limited to 'chrome/browser/ui/webui/extensions/install_extension_handler.cc')
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.cc b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
index 3a53ff6..78b1b2c 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/extensions/extension_switch_utils.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -79,11 +80,13 @@ void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) {
return;
}
- Profile* profile = Profile::FromWebUI(web_ui());
+ Browser* browser = browser::FindBrowserWithWebContents(
+ web_ui()->GetWebContents());
+ Profile* profile = browser->profile();
scoped_refptr<CrxInstaller> crx_installer(
CrxInstaller::Create(
ExtensionSystem::Get(profile)->extension_service(),
- new ExtensionInstallPrompt(profile)));
+ new ExtensionInstallPrompt(browser)));
crx_installer->set_off_store_install_allow_reason(
CrxInstaller::OffStoreInstallAllowedFromSettingsPage);