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

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

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/chrome_download_manager_delegate.h
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 219942581b817fdc0e6201a295abd57548779c41..0762b7de416a8afc53936ec08524b99e8e33b935 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -10,8 +10,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/safe_browsing/download_protection_service.h"
+#include "chrome/browser/download/download_history.h"
#include "chrome/browser/download/download_path_reservation_tracker.h"
+#include "chrome/browser/safe_browsing/download_protection_service.h"
#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager_delegate.h"
@@ -57,6 +58,9 @@ class ChromeDownloadManagerDelegate
void SetDownloadManager(content::DownloadManager* dm);
+ void AddHistoryObserver(DownloadHistory::Observer* observer);
asanka 2012/09/24 18:39:43 Nit: Document these?
benjhayden 2012/09/24 20:12:11 Done.
+ void RemoveHistoryObserver(DownloadHistory::Observer* observer);
+
// Should be called before the first call to ShouldCompleteDownload() to
// disable SafeBrowsing checks for |item|.
static void DisableSafeBrowsing(content::DownloadItem* item);
@@ -75,17 +79,6 @@ class ChromeDownloadManagerDelegate
const base::Closure& complete_callback) OVERRIDE;
virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE;
virtual bool GenerateFileHash() OVERRIDE;
- virtual void AddItemToPersistentStore(content::DownloadItem* item) OVERRIDE;
- virtual void UpdateItemInPersistentStore(
- content::DownloadItem* item) OVERRIDE;
- virtual void UpdatePathForItemInPersistentStore(
- content::DownloadItem* item,
- const FilePath& new_path) OVERRIDE;
- virtual void RemoveItemFromPersistentStore(
- content::DownloadItem* item) OVERRIDE;
- virtual void RemoveItemsFromPersistentStoreBetween(
- base::Time remove_begin,
- base::Time remove_end) OVERRIDE;
virtual void GetSaveDir(content::BrowserContext* browser_context,
FilePath* website_save_dir,
FilePath* download_save_dir,
@@ -102,7 +95,6 @@ class ChromeDownloadManagerDelegate
void ClearLastDownloadPath();
DownloadPrefs* download_prefs() { return download_prefs_.get(); }
- DownloadHistory* download_history() { return download_history_.get(); }
protected:
// So that test classes can inherit from this for override purposes.
@@ -213,9 +205,6 @@ class ChromeDownloadManagerDelegate
content::DownloadDangerType danger_type,
const FilePath& target_path);
- // Callback from history system.
- void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle);
-
// Check policy of whether we should open this download with a web intents
// dispatch.
bool ShouldOpenWithWebIntents(const content::DownloadItem* item);
« no previous file with comments | « no previous file | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | chrome/browser/download/download_history.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698