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

Unified Diff: chrome/browser/download/download_service.cc

Issue 11574006: Implement chrome.downloads.onDeterminingFilename() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r177662 Created 7 years, 11 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_service.cc
diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc
index dae3bc4e1d2177b6256dc7a8a3ee91cbf93b1a85..95cae8f875b98c175511aa8d2badac5c346176b6 100644
--- a/chrome/browser/download/download_service.cc
+++ b/chrome/browser/download/download_service.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/download/download_history.h"
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/download/download_status_updater.h"
+#include "chrome/browser/extensions/api/downloads/downloads_api.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/net/chrome_net_log.h"
@@ -45,6 +46,11 @@ ChromeDownloadManagerDelegate* DownloadService::GetDownloadManagerDelegate() {
manager_delegate_->SetDownloadManager(manager);
+#if !defined(OS_ANDROID)
+ extension_event_router_.reset(new ExtensionDownloadsEventRouter(
+ profile_, manager));
+#endif
+
if (!profile_->IsOffTheRecord()) {
HistoryService* hs = HistoryServiceFactory::GetForProfile(
profile_, Profile::EXPLICIT_ACCESS);
@@ -120,6 +126,9 @@ void DownloadService::Shutdown() {
// manually earlier. See http://crbug.com/131692
BrowserContext::GetDownloadManager(profile_)->Shutdown();
}
+#if !defined(OS_ANDROID)
+ extension_event_router_.reset();
+#endif
manager_delegate_ = NULL;
download_history_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698