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

Unified Diff: chrome/browser/plugin_installer.cc

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile 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/plugin_installer.cc
===================================================================
--- chrome/browser/plugin_installer.cc (revision 140592)
+++ chrome/browser/plugin_installer.cc (working copy)
@@ -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 {
@@ -193,8 +195,8 @@
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(
@@ -206,8 +208,7 @@
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(

Powered by Google App Engine
This is Rietveld 408576698