Index: chrome/browser/download/download_history.cc |
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc |
index 115541a4d24742ed52fa9ed9683f915109b60175..d62494cb73b59eee8b7576a1e627aefb3ee989c0 100644 |
--- a/chrome/browser/download/download_history.cc |
+++ b/chrome/browser/download/download_history.cc |
@@ -5,9 +5,9 @@ |
#include "chrome/browser/download/download_history.h" |
#include "base/logging.h" |
+#include "chrome/browser/download/download_item.h" |
#include "chrome/browser/history/download_history_info.h" |
#include "chrome/browser/history/history_marshaling.h" |
-#include "chrome/browser/download/download_item.h" |
#include "chrome/browser/profiles/profile.h" |
// Our download table ID starts at 1, so we use 0 to represent a download that |
@@ -33,6 +33,17 @@ DownloadHistory::~DownloadHistory() { |
delete i->second.second; |
} |
+void DownloadHistory::GetNextId( |
+ HistoryService::DownloadNextIdCallback* callback) { |
+ DCHECK(callback); |
+ HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); |
+ if (!hs) { |
+ delete callback; |
+ return; |
+ } |
+ hs->GetNextDownloadId(&history_consumer_, callback); |
+} |
+ |
void DownloadHistory::Load(HistoryService::DownloadQueryCallback* callback) { |
DCHECK(callback); |
HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); |