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

Unified Diff: chrome/browser/download/download_extension_api.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/download/download_extension_api.cc
===================================================================
--- chrome/browser/download/download_extension_api.cc (revision 140592)
+++ chrome/browser/download/download_extension_api.cc (working copy)
@@ -47,6 +47,7 @@
#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
+using content::BrowserContext;
using content::BrowserThread;
using content::DownloadId;
using content::DownloadItem;
@@ -313,12 +314,12 @@
Profile* profile,
bool include_incognito,
DownloadManager** manager, DownloadManager** incognito_manager) {
- *manager = DownloadServiceFactory::GetForProfile(profile)->
- GetDownloadManager();
+ *manager = BrowserContext::GetDownloadManager(profile);
*incognito_manager = NULL;
- if (include_incognito && profile->HasOffTheRecordProfile())
- *incognito_manager = DownloadServiceFactory::GetForProfile(profile->
- GetOffTheRecordProfile())->GetDownloadManager();
+ if (include_incognito && profile->HasOffTheRecordProfile()) {
+ *incognito_manager = BrowserContext::GetDownloadManager(
+ profile->GetOffTheRecordProfile());
+ }
}
DownloadItem* GetActiveItemInternal(

Powered by Google App Engine
This is Rietveld 408576698