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

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: Fix unit tests 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
« no previous file with comments | « no previous file | chrome/browser/history/android/android_history_provider_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b1b406a5f6f8cea10e1485eb4359e93902318592..b4827da0d8d3ce5aa808dd1454e854c48fd22403 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -781,17 +781,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();
}
@@ -1002,21 +1004,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();
}
« no previous file with comments | « no previous file | chrome/browser/history/android/android_history_provider_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698