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

Unified Diff: chrome/browser/download/download_history.cc

Issue 7237034: sql::MetaTable.next_download_id, DownloadManager::GetNextId() (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 9 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/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 115541a4d24742ed52fa9ed9683f915109b60175..ff5d2447caa207c442b424bfc9dd8ba48d5737c1 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -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);

Powered by Google App Engine
This is Rietveld 408576698