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

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

Issue 230103002: [Downloads] Ask DownloadHistory if a download was from history. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build Created 6 years, 7 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/download/download_item_model.cc ('k') | chrome/browser/download/download_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_service.h
diff --git a/chrome/browser/download/download_service.h b/chrome/browser/download/download_service.h
index fece2d19a78388e9e6c1aa537dd666554817c212..19ad3fb9349a946e723f34fe792e9dc8fb99535e 100644
--- a/chrome/browser/download/download_service.h
+++ b/chrome/browser/download/download_service.h
@@ -35,8 +35,8 @@ class DownloadService : public KeyedService {
// Get the interface to the history system. Returns NULL if profile is
// incognito or if the DownloadManager hasn't been created yet or if there is
- // no HistoryService for profile.
- DownloadHistory* GetDownloadHistory();
+ // no HistoryService for profile. Virtual for testing.
+ virtual DownloadHistory* GetDownloadHistory();
#if !defined(OS_ANDROID)
extensions::ExtensionDownloadsEventRouter* GetExtensionEventRouter() {
@@ -88,6 +88,8 @@ class DownloadService : public KeyedService {
// The UI controller is responsible for observing the download manager and
// notifying the UI of any new downloads. Its lifetime matches that of the
// associated download manager.
+ // Note on destruction order: download_ui_ depends on download_history_ and
+ // should be destroyed before the latter.
scoped_ptr<DownloadUIController> download_ui_;
// On Android, GET downloads are not handled by the DownloadManager.
« no previous file with comments | « chrome/browser/download/download_item_model.cc ('k') | chrome/browser/download/download_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698