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

Unified Diff: chrome/browser/ui/webui/downloads_ui.cc

Issue 8135017: Refactor downloads into a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated latest rounds of comments from John. Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_ui.cc
diff --git a/chrome/browser/ui/webui/downloads_ui.cc b/chrome/browser/ui/webui/downloads_ui.cc
index 54e1eeedd3c6ed543d0e6c6d9eb04b244a4cfba8..3afd6f3ddab79d07c1adae8f284621e0c569e7a9 100644
--- a/chrome/browser/ui/webui/downloads_ui.cc
+++ b/chrome/browser/ui/webui/downloads_ui.cc
@@ -9,6 +9,8 @@
#include "base/threading/thread.h"
#include "base/values.h"
#include "chrome/browser/defaults.h"
+#include "chrome/browser/download/download_service.h"
+#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
@@ -78,7 +80,8 @@ ChromeWebUIDataSource* CreateDownloadsUIHTMLSource() {
///////////////////////////////////////////////////////////////////////////////
DownloadsUI::DownloadsUI(TabContents* contents) : ChromeWebUI(contents) {
- DownloadManager* dlm = GetProfile()->GetDownloadManager();
+ DownloadManager* dlm =
+ DownloadServiceFactory::GetForProfile(GetProfile())->GetDownloadManager();
DownloadsDOMHandler* handler = new DownloadsDOMHandler(dlm);
AddMessageHandler(handler);
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698