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

Unified Diff: chrome/browser/download/download_crx_util.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/download/download_crx_util.cc
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index 574c9ab9a1d25a996b0e739832cc488e598c2fdb..186abe872a6269fa7e64063c8ab2ea4db6be9e78 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -4,6 +4,8 @@
//
// Download code which handles CRX files (extensions, themes, apps, ...).
+#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/crx_installer.h"
#include "chrome/browser/extensions/extension_install_ui.h"
@@ -55,8 +57,10 @@ scoped_refptr<CrxInstaller> OpenChromeExtension(
CHECK(service);
NotificationService* nservice = NotificationService::current();
GURL nonconst_download_url = download_item.GetURL();
+ DownloadManager* download_manager =
+ DownloadServiceFactory::GetForProfile(profile)->GetDownloadManager();
nservice->Notify(chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL,
- Source<DownloadManager>(profile->GetDownloadManager()),
+ Source<DownloadManager>(download_manager),
Details<GURL>(&nonconst_download_url));
scoped_refptr<CrxInstaller> installer(

Powered by Google App Engine
This is Rietveld 408576698