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

Unified Diff: content/browser/browser_context.cc

Issue 10344024: Rewrite download manager unit to be actual unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate PS7 comment. 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: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 17e60d969b96ff3774345e9e3d40ba8d139e4d36..9814a1936b71699cd2ca3d40b5bfccc162e68cc6 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -75,7 +75,7 @@ void CreateQuotaManagerAndClients(BrowserContext* context) {
context->GetPath(), context->IsOffTheRecord(),
context->GetSpecialStoragePolicy(), quota_manager->proxy(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
- context->SetUserData(kDatabaseTrackerKeyName,
+ context->SetUserData(kDatabaseTrackerKeyName,
new UserDataAdapter<DatabaseTracker>(db_tracker));
FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath();
@@ -142,8 +142,8 @@ DOMStorageContextImpl* GetDOMStorageContextImpl(BrowserContext* context) {
DownloadManager* BrowserContext::GetDownloadManager(
BrowserContext* context) {
if (!context->GetUserData(kDownloadManagerKeyName)) {
- scoped_refptr<DownloadManager> download_manager = new DownloadManagerImpl(
- GetContentClient()->browser()->GetNetLog());
+ scoped_refptr<DownloadManager> download_manager =
+ DownloadManagerImpl::Create(GetContentClient()->browser()->GetNetLog());
context->SetUserData(
kDownloadManagerKeyName,
new UserDataAdapter<DownloadManager>(download_manager));

Powered by Google App Engine
This is Rietveld 408576698