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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix chromeos ui_tests Created 8 years, 11 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: content/browser/download/download_manager_impl.cc
===================================================================
--- content/browser/download/download_manager_impl.cc (revision 117096)
+++ content/browser/download/download_manager_impl.cc (working copy)
@@ -86,6 +86,18 @@
} // namespace
+namespace content {
+
+// static
+DownloadManager* DownloadManager::Create(
+ content::DownloadManagerDelegate* delegate,
+ DownloadIdFactory* id_factory,
+ DownloadStatusUpdater* status_updater) {
+ return new DownloadManagerImpl(delegate, id_factory, status_updater);
+}
+
+} // namespace content
+
DownloadManagerImpl::DownloadManagerImpl(
content::DownloadManagerDelegate* delegate,
DownloadIdFactory* id_factory,
@@ -250,8 +262,7 @@
// In test mode, there may be no ResourceDispatcherHost. In this case it's
// safe to avoid setting |file_manager_| because we only call a small set of
// functions, none of which need it.
- ResourceDispatcherHost* rdh =
- content::GetContentClient()->browser()->GetResourceDispatcherHost();
+ ResourceDispatcherHost* rdh = ResourceDispatcherHost::Get();
if (rdh) {
file_manager_ = rdh->download_file_manager();
DCHECK(file_manager_);
@@ -781,7 +792,7 @@
const DownloadSaveInfo& save_info,
WebContents* web_contents) {
ResourceDispatcherHost* resource_dispatcher_host =
- content::GetContentClient()->browser()->GetResourceDispatcherHost();
+ ResourceDispatcherHost::Get();
// We send a pointer to content::ResourceContext, instead of the usual
// reference, so that a copy of the object isn't made.

Powered by Google App Engine
This is Rietveld 408576698