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

Unified Diff: chrome/browser/history/history_backend.cc

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 years, 5 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
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_marshaling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 5da842489f53439ee25dfffae27e3533050e8bdd..50f7370105727a160cb23530022bc96bc375f62b 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -1083,7 +1083,7 @@ void HistoryBackend::QueryDownloads(
return;
if (db_.get())
db_->QueryDownloads(&request->value);
- request->ForwardResult(DownloadQueryRequest::TupleType(&request->value));
+ request->ForwardResult(DownloadQueryRequest::TupleType(&request->value.results));
}
// Clean up entries that has been corrupted (because of the crash, for example).
@@ -1115,11 +1115,12 @@ void HistoryBackend::CreateDownload(
scoped_refptr<DownloadCreateRequest> request,
int32 id,
const DownloadHistoryInfo& history_info) {
- int64 db_handle = 0;
if (!request->canceled()) {
- if (db_.get())
- db_handle = db_->CreateDownload(history_info);
- request->ForwardResult(DownloadCreateRequest::TupleType(id, db_handle));
+ if (db_.get()) {
+ bool success = db_->CreateDownload(history_info);
+ DCHECK(success) << history_info.id;
+ }
+ request->ForwardResult(DownloadCreateRequest::TupleType(id));
}
}
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/history/history_marshaling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698