| Index: chrome/browser/history/download_database.h
|
| diff --git a/chrome/browser/history/download_database.h b/chrome/browser/history/download_database.h
|
| index bef60a1bc5cedaaceea235828407b2d6f2d0dee3..4109c94fc85c13d8c4347ff5444487af88fe2655 100644
|
| --- a/chrome/browser/history/download_database.h
|
| +++ b/chrome/browser/history/download_database.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_HISTORY_DOWNLOAD_DATABASE_H_
|
| #pragma once
|
|
|
| +#include "base/callback.h"
|
| #include "chrome/browser/history/history_types.h"
|
|
|
| struct DownloadHistoryInfo;
|
| @@ -25,13 +26,13 @@ class DownloadDatabase {
|
| virtual ~DownloadDatabase();
|
|
|
| // Get all the downloads from the database.
|
| - void QueryDownloads(std::vector<DownloadHistoryInfo>* results);
|
| + void QueryDownloads(DownloadQueryParameters* params);
|
|
|
| // Update the state of one download. Returns true if successful.
|
| - bool UpdateDownload(int64 received_bytes, int32 state, DownloadID db_handle);
|
| + bool UpdateDownload(int64 received_bytes, int32 state, DownloadID id);
|
|
|
| // Update the path of one download. Returns true if successful.
|
| - bool UpdateDownloadPath(const FilePath& path, DownloadID db_handle);
|
| + bool UpdateDownloadPath(const FilePath& path, DownloadID id);
|
|
|
| // Fixes state of the download entries. Sometimes entries with IN_PROGRESS
|
| // state are not updated during browser shutdown (particularly when crashing).
|
| @@ -40,10 +41,10 @@ class DownloadDatabase {
|
| bool CleanUpInProgressEntries();
|
|
|
| // Create a new database entry for one download and return its primary db id.
|
| - int64 CreateDownload(const DownloadHistoryInfo& info);
|
| + bool CreateDownload(const DownloadHistoryInfo& info);
|
|
|
| // Remove a download from the database.
|
| - void RemoveDownload(DownloadID db_handle);
|
| + void RemoveDownload(DownloadID id);
|
|
|
| // Remove all completed downloads that started after |remove_begin|
|
| // (inclusive) and before |remove_end|. You may use null Time values
|
| @@ -63,6 +64,8 @@ class DownloadDatabase {
|
| bool DropDownloadTable();
|
|
|
| private:
|
| + bool MaybeUpgradeTable(DownloadQueryParameters::GetNextIdThunk get_next_id);
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(DownloadDatabase);
|
| };
|
|
|
|
|