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..25d07d91d3edadddffb2c61370299a3dac4d8986 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,20 @@ class DownloadDatabase { |
void RemoveDownloadURLs(uint32_t id); |
+ // Creates a new download job. Returns true on success, or false otherwise. |
+ bool CreateDownloadJob(const DownloadJobInfo& info); |
+ |
+ // Updates the state of a download job. Returns true on success, or false |
+ // if the job doesn't exists.. |
+ bool UpdateDownloadJob(const DownloadJobInfo& info); |
+ |
+ // Delete all the download jobs associated with one DownloadRow. |
+ void RemoveDownloadJobs(uint32_t id); |
Scott Hess - ex-Googler
2017/02/06 21:22:16
Seems like this should be DownloadId.
qinmin
2017/02/06 23:39:22
Done.
|
+ |
+ // 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/06 21:22:16
This too.
Also, you should be able to return a ma
qinmin
2017/02/06 23:39:22
Done changing it to DownloadId. For the return val
|
+ |
bool owning_thread_set_; |
base::PlatformThreadId owning_thread_; |