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

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

Issue 369673009: Change AndroidHistoryProviderService to use CancelableTaskTracker (2/6) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancelable_task_tracker.2
Patch Set: clang-format Created 6 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
Index: chrome/browser/history/history_backend_android.cc
diff --git a/chrome/browser/history/history_backend_android.cc b/chrome/browser/history/history_backend_android.cc
index 415077420ff77e7369458d0c7c62e580a6539e3a..f2be5ac9543077a292414789ae1fbd92900bfbfb 100644
--- a/chrome/browser/history/history_backend_android.cc
+++ b/chrome/browser/history/history_backend_android.cc
@@ -21,21 +21,17 @@ void HistoryBackend::InsertHistoryAndBookmark(
request->ForwardResult(request->handle(), id != 0, id);
}
-void HistoryBackend::QueryHistoryAndBookmarks(
- scoped_refptr<QueryRequest> request,
+AndroidStatement* HistoryBackend::QueryHistoryAndBookmarks(
const std::vector<HistoryAndBookmarkRow::ColumnID>& projections,
const std::string& selection,
const std::vector<base::string16>& selection_args,
const std::string& sort_order) {
- if (request->canceled())
- return;
-
AndroidStatement* statement = NULL;
if (android_provider_backend_) {
statement = android_provider_backend_->QueryHistoryAndBookmarks(
projections, selection, selection_args, sort_order);
}
- request->ForwardResult(request->handle(), statement, statement);
+ return statement;
}
void HistoryBackend::UpdateHistoryAndBookmarks(
@@ -163,21 +159,17 @@ void HistoryBackend::DeleteSearchTerms(
request->ForwardResult(request->handle(), result, count);
}
-void HistoryBackend::QuerySearchTerms(
- scoped_refptr<QueryRequest> request,
+AndroidStatement* HistoryBackend::QuerySearchTerms(
const std::vector<SearchRow::ColumnID>& projections,
const std::string& selection,
const std::vector<base::string16>& selection_args,
const std::string& sort_order) {
- if (request->canceled())
- return;
-
AndroidStatement* statement = NULL;
- if (android_provider_backend_)
+ if (android_provider_backend_) {
Miguel Garcia 2014/07/07 09:51:57 why would this not be there? Can we DCHECK(android
sdefresne 2014/07/16 08:07:24 The code already tested for the pointer to be non-
statement = android_provider_backend_->QuerySearchTerms(projections,
selection, selection_args, sort_order);
-
- request->ForwardResult(request->handle(), statement, statement);
+ }
+ return statement;
}
} // namespace history
« chrome/browser/history/history_backend.h ('K') | « chrome/browser/history/history_backend.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698