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)); |
} |
} |