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

Unified Diff: content/browser/browser_context.cc

Issue 10912173: Replace the DownloadFileManager with direct ownership of DownloadFileImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. Created 8 years, 3 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/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index b2aadfe72d4c1d32d0080691931ac098c291bbf6..c9f2c3ee08aeea01bd78d0cd7a4222a0014ab116 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -6,13 +6,12 @@
#if !defined(OS_IOS)
#include "content/browser/appcache/chrome_appcache_service.h"
-#include "webkit/database/database_tracker.h"
#include "content/browser/dom_storage/dom_storage_context_impl.h"
-#include "content/browser/download/download_file_manager.h"
+#include "content/browser/download/download_file_factory.h"
+#include "content/browser/download/download_item_factory.h"
#include "content/browser/download/download_manager_impl.h"
#include "content/browser/in_process_webkit/indexed_db_context_impl.h"
#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
-#include "content/public/browser/resource_context.h"
#include "content/public/browser/site_instance.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/storage_partition_impl_map.h"
@@ -25,6 +24,7 @@
#include "net/cookies/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#include "webkit/database/database_tracker.h"
#endif // !OS_IOS
using base::UserDataAdapter;
@@ -88,12 +88,10 @@ DownloadManager* BrowserContext::GetDownloadManager(
if (!context->GetUserData(kDownloadManagerKeyName)) {
ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get();
DCHECK(rdh);
- DownloadFileManager* file_manager = rdh->download_file_manager();
- DCHECK(file_manager);
scoped_refptr<DownloadManager> download_manager =
new DownloadManagerImpl(
- file_manager,
scoped_ptr<DownloadItemFactory>(),
benjhayden 2012/09/24 17:43:27 Would it make more sense to not pass the factories
Randy Smith (Not in Mondays) 2012/09/26 21:01:05 Yeah, I think this makes sense. Done.
+ scoped_ptr<DownloadFileFactory>(),
GetContentClient()->browser()->GetNetLog());
context->SetUserData(

Powered by Google App Engine
This is Rietveld 408576698