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

Unified Diff: components/history/core/browser/download_database.h

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: addressing comments Created 3 years, 10 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: components/history/core/browser/download_database.h
diff --git a/components/history/core/browser/download_database.h b/components/history/core/browser/download_database.h
index 6388195eccf2b1b0f314fe86c21487ce10a6fd21..bdffe4d2da79e37d134a68f1a1bdfb6dcc210a76 100644
--- a/components/history/core/browser/download_database.h
+++ b/components/history/core/browser/download_database.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <map>
#include <string>
#include <vector>
@@ -22,6 +23,7 @@ class Connection;
namespace history {
+struct DownloadJobInfo;
struct DownloadRow;
// Maintains a table of downloads.
@@ -113,6 +115,17 @@ class DownloadDatabase {
void RemoveDownloadURLs(uint32_t id);
+ // Creates a new download job if it doesn't exist, or updates an existing one.
+ // Returns true on success, or false otherwise.
+ bool CreateOrUpdateDownloadJob(const DownloadJobInfo& info);
+
+ // Delete all the download jobs associated with one DownloadRow.
+ void RemoveDownloadJobs(DownloadId id);
+
+ // Helper method to query the download jobs for all the records in
+ // |download_row_map|.
+ void QueryDownloadJobs(std::map<uint32_t, DownloadRow*>* download_row_map);
Scott Hess - ex-Googler 2017/02/08 22:01:39 I still want this key to be a DownloadId, but I ca
qinmin 2017/02/09 01:01:42 Done. Changed all member functions that using uint
+
bool owning_thread_set_;
base::PlatformThreadId owning_thread_;

Powered by Google App Engine
This is Rietveld 408576698