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

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: Merged to LKGR to run try bots. 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..72f686b9f7da797a9058f04adf34cc6f5f3d466a 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,9 @@ base::DictionaryValue* DownloadItemToJSON(DownloadItem* item) {
ExtensionDownloadsEventRouter::ExtensionDownloadsEventRouter(
Profile* profile)
: profile_(profile),
- manager_(profile ? profile->GetDownloadManager() : NULL) {
+ manager_(profile ?
+ DownloadServiceFactory::GetForProfile(profile)
+ ->GetDownloadManager() : NULL) {
Miranda Callahan 2011/10/06 20:07:32 hmm, again, wrapping before the -> is not kosher,
Randy Smith (Not in Mondays) 2011/10/08 23:46:54 Done.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(profile_);
DCHECK(manager_);

Powered by Google App Engine
This is Rietveld 408576698