| Index: chrome/browser/history/history_backend.cc
|
| diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
|
| index b2c0c69d47316b07f3748b8b4663814d6475321e..a3fb38f409a0820f40588c851b7b4924b3cd26af 100644
|
| --- a/chrome/browser/history/history_backend.cc
|
| +++ b/chrome/browser/history/history_backend.cc
|
| @@ -152,14 +152,6 @@
|
| scoped_refptr<HistoryBackend> history_backend_;
|
| };
|
|
|
| -// HistoryBackend::QueryURLResult ----------------------------------------------
|
| -
|
| -HistoryBackend::QueryURLResult::QueryURLResult() : success(false) {
|
| -}
|
| -
|
| -HistoryBackend::QueryURLResult::~QueryURLResult() {
|
| -}
|
| -
|
| // HistoryBackend --------------------------------------------------------------
|
|
|
| HistoryBackend::HistoryBackend(const base::FilePath& history_dir,
|
| @@ -996,15 +988,26 @@
|
| return false;
|
| }
|
|
|
| -HistoryBackend::QueryURLResult HistoryBackend::QueryURL(const GURL& url,
|
| - bool want_visits) {
|
| - QueryURLResult result;
|
| - result.success = db_ && db_->GetRowForURL(url, &result.row);
|
| - // Optionally query the visits.
|
| - if (result.success && want_visits) {
|
| - db_->GetVisitsForURL(result.row.id(), &result.visits);
|
| - }
|
| - return result;
|
| +void HistoryBackend::QueryURL(scoped_refptr<QueryURLRequest> request,
|
| + const GURL& url,
|
| + bool want_visits) {
|
| + if (request->canceled())
|
| + return;
|
| +
|
| + bool success = false;
|
| + URLRow* row = &request->value.a;
|
| + VisitVector* visits = &request->value.b;
|
| + if (db_) {
|
| + if (db_->GetRowForURL(url, row)) {
|
| + // Have a row.
|
| + success = true;
|
| +
|
| + // Optionally query the visits.
|
| + if (want_visits)
|
| + db_->GetVisitsForURL(row->id(), visits);
|
| + }
|
| + }
|
| + request->ForwardResult(request->handle(), success, row, visits);
|
| }
|
|
|
| TypedUrlSyncableService* HistoryBackend::GetTypedUrlSyncableService() const {
|
|
|