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

Unified Diff: chrome/browser/extensions/extension_downloads_api.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
Index: chrome/browser/extensions/extension_downloads_api.cc
diff --git a/chrome/browser/extensions/extension_downloads_api.cc b/chrome/browser/extensions/extension_downloads_api.cc
index 2182b000fdcf62ef0ff1d153824ef259c545a0f2..b063c0cbe406eacef3097f5d7890ee78500a18a3 100644
--- a/chrome/browser/extensions/extension_downloads_api.cc
+++ b/chrome/browser/extensions/extension_downloads_api.cc
@@ -21,6 +21,8 @@
#include "base/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/download/download_service.h"
+#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/extensions/extension_downloads_api_constants.h"
#include "chrome/browser/extensions/extension_event_names.h"
@@ -414,7 +416,10 @@ base::DictionaryValue* DownloadItemToJSON(DownloadItem* item) {
ExtensionDownloadsEventRouter::ExtensionDownloadsEventRouter(
Profile* profile)
: profile_(profile),
- manager_(profile ? profile->GetDownloadManager() : NULL) {
+ manager_(
+ profile ?
+ DownloadServiceFactory::GetForProfile(profile)->GetDownloadManager() :
+ NULL) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(profile_);
DCHECK(manager_);
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698