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

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: Move responsibility of determining whether to show a download in the UI to DownloadItemModel Created 6 years, 8 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.h
diff --git a/chrome/browser/download/download_service.h b/chrome/browser/download/download_service.h
index 1e0ad634b1105b115522e155717c9b5e4acfae61..2cb9df8fc2d1be534e4a85713859e8aec3423af3 100644
--- a/chrome/browser/download/download_service.h
+++ b/chrome/browser/download/download_service.h
@@ -31,8 +31,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)
ExtensionDownloadsEventRouter* GetExtensionEventRouter() {
@@ -84,6 +84,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.

Powered by Google App Engine
This is Rietveld 408576698