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

Unified Diff: chrome/browser/ui/webui/downloads_ui.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/ui/webui/downloads_ui.cc
===================================================================
--- chrome/browser/ui/webui/downloads_ui.cc (revision 140592)
+++ chrome/browser/ui/webui/downloads_ui.cc (working copy)
@@ -27,6 +27,7 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
+using content::BrowserContext;
using content::DownloadManager;
using content::WebContents;
@@ -89,8 +90,7 @@
DownloadsUI::DownloadsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
Profile* profile = Profile::FromWebUI(web_ui);
- DownloadManager* dlm =
- DownloadServiceFactory::GetForProfile(profile)->GetDownloadManager();
+ DownloadManager* dlm = BrowserContext::GetDownloadManager(profile);
DownloadsDOMHandler* handler = new DownloadsDOMHandler(dlm);
web_ui->AddMessageHandler(handler);

Powered by Google App Engine
This is Rietveld 408576698