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

Unified Diff: chrome/browser/android/provider/chrome_browser_provider.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/android/provider/chrome_browser_provider.cc
diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc
index be263b72684f24f96a56d3b6bffe96aded2d25eb..ee8253ccff609f5acd8c06e8b607e2d317cb92c8 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -779,17 +779,19 @@ class QueryBookmarksFromAPITask : public HistoryProviderTask {
const std::string& sort_order) {
RunAsyncRequestOnUIThreadBlocking(
base::Bind(&AndroidHistoryProviderService::QueryHistoryAndBookmarks,
- base::Unretained(service()), projections, selection,
- selection_args, sort_order, cancelable_consumer(),
+ base::Unretained(service()),
+ projections,
+ selection,
+ selection_args,
+ sort_order,
base::Bind(&QueryBookmarksFromAPITask::OnBookmarksQueried,
- base::Unretained(this))));
+ base::Unretained(this)),
+ cancelable_tracker()));
return result_;
}
private:
- void OnBookmarksQueried(AndroidHistoryProviderService::Handle handle,
- bool succeeded,
- history::AndroidStatement* statement) {
+ void OnBookmarksQueried(history::AndroidStatement* statement) {
result_ = statement;
RequestCompleted();
}
@@ -1000,21 +1002,22 @@ class QuerySearchTermsFromAPITask : public SearchTermTask {
const std::string& selection,
const std::vector<base::string16>& selection_args,
const std::string& sort_order) {
- RunAsyncRequestOnUIThreadBlocking(
- base::Bind(&AndroidHistoryProviderService::QuerySearchTerms,
- base::Unretained(service()), projections, selection,
- selection_args, sort_order, cancelable_consumer(),
- base::Bind(
- &QuerySearchTermsFromAPITask::OnSearchTermsQueried,
- base::Unretained(this))));
+ RunAsyncRequestOnUIThreadBlocking(base::Bind(
+ &AndroidHistoryProviderService::QuerySearchTerms,
+ base::Unretained(service()),
+ projections,
+ selection,
+ selection_args,
+ sort_order,
+ base::Bind(&QuerySearchTermsFromAPITask::OnSearchTermsQueried,
+ base::Unretained(this)),
+ cancelable_tracker()));
return result_;
}
private:
// Callback to return the result.
- void OnSearchTermsQueried(AndroidHistoryProviderService::Handle handle,
- bool succeeded,
- history::AndroidStatement* statement) {
+ void OnSearchTermsQueried(history::AndroidStatement* statement) {
result_ = statement;
RequestCompleted();
}

Powered by Google App Engine
This is Rietveld 408576698