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

Unified Diff: chrome/browser/history/history_backend.cc

Issue 10665049: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index c932dd939cdc937c399a375d03721af561a520fa..2df4293686b19dceec506ccd96b67f67f4f9b2a3 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/cancelable_request.h"
+#include "chrome/browser/download/download_persistent_store_info.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_publisher.h"
#include "chrome/browser/history/in_memory_history_backend.h"
@@ -31,7 +32,6 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
-#include "content/public/browser/download_persistent_store_info.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -1215,23 +1215,16 @@ void HistoryBackend::CleanUpInProgressEntries() {
// Update a particular download entry.
void HistoryBackend::UpdateDownload(
- const content::DownloadPersistentStoreInfo& data) {
+ const DownloadPersistentStoreInfo& data) {
if (db_.get())
db_->UpdateDownload(data);
}
-// Update the path of a particular download entry.
-void HistoryBackend::UpdateDownloadPath(const FilePath& path,
- int64 db_handle) {
- if (db_.get())
- db_->UpdateDownloadPath(path, db_handle);
-}
-
// Create a new download entry and pass back the db_handle to it.
void HistoryBackend::CreateDownload(
scoped_refptr<DownloadCreateRequest> request,
int32 id,
- const content::DownloadPersistentStoreInfo& history_info) {
+ const DownloadPersistentStoreInfo& history_info) {
int64 db_handle = 0;
if (!request->canceled()) {
if (db_.get())
@@ -1240,15 +1233,9 @@ void HistoryBackend::CreateDownload(
}
}
-void HistoryBackend::RemoveDownload(int64 db_handle) {
- if (db_.get())
- db_->RemoveDownload(db_handle);
-}
-
-void HistoryBackend::RemoveDownloadsBetween(const Time remove_begin,
- const Time remove_end) {
+void HistoryBackend::RemoveDownloads(const std::set<int64>& handles) {
if (db_.get())
- db_->RemoveDownloadsBetween(remove_begin, remove_end);
+ db_->RemoveDownloads(handles);
}
void HistoryBackend::QueryHistory(scoped_refptr<QueryHistoryRequest> request,

Powered by Google App Engine
This is Rietveld 408576698