diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 14:55:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-06 14:55:57 +0000 |
commit | b441a849460cc2fca0ce9a18fe8e255cadc0656c (patch) | |
tree | 83610aa4039deac864b88cbc1c3df02b92e004f0 /chrome/browser/plugin_installer.cc | |
parent | 7a2dbfbf3cfea03bca0cfa79c639e0683dc11569 (diff) | |
download | chromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.zip chromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.tar.gz chromium_src-b441a849460cc2fca0ce9a18fe8e255cadc0656c.tar.bz2 |
Move creation and ownership of DownloadManager from the embedder to content. This matches all the other objects that content depends on.
In a followup change, I'll make content support NULL DownloadManagerDelegates to match the rest of the delegate interfaces.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/10535026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_installer.cc')
-rw-r--r-- | chrome/browser/plugin_installer.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc index 9e83746..7bb8849 100644 --- a/chrome/browser/plugin_installer.cc +++ b/chrome/browser/plugin_installer.cc @@ -27,8 +27,10 @@ #include "net/url_request/url_request.h" #include "webkit/plugins/npapi/plugin_group.h" +using content::BrowserContext; using content::BrowserThread; using content::DownloadItem; +using content::DownloadManager; using content::ResourceDispatcherHost; namespace { @@ -192,8 +194,8 @@ void PluginInstaller::StartInstalling(TabContentsWrapper* wrapper) { state_ = INSTALLER_STATE_DOWNLOADING; FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadStarted()); content::WebContents* web_contents = wrapper->web_contents(); - DownloadService* download_service = - DownloadServiceFactory::GetForProfile(wrapper->profile()); + DownloadManager* download_manager = + BrowserContext::GetDownloadManager(wrapper->profile()); download_util::RecordDownloadSource( download_util::INITIATED_BY_PLUGIN_INSTALLER); BrowserThread::PostTask( @@ -205,8 +207,7 @@ void PluginInstaller::StartInstalling(TabContentsWrapper* wrapper) { web_contents->GetRenderViewHost()->GetRoutingID(), base::Bind(&PluginInstaller::DownloadStarted, base::Unretained(this), - make_scoped_refptr( - download_service->GetDownloadManager())))); + make_scoped_refptr(download_manager)))); } void PluginInstaller::DownloadStarted( |