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

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

Issue 370533003: Change AndroidHistoryProviderService to use CancelableTaskTracker (6/6) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancelable_task_tracker.6
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 | « chrome/browser/history/history_backend.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e27b8dc80298d800c472639f238bb4621581c3e5..86336036847c17f0b7f4e625ce3d9b229802e258 100644
--- a/chrome/browser/history/history_backend_android.cc
+++ b/chrome/browser/history/history_backend_android.cc
@@ -41,36 +41,25 @@ int HistoryBackend::UpdateHistoryAndBookmarks(
return count;
}
-void HistoryBackend::DeleteHistoryAndBookmarks(
- scoped_refptr<DeleteRequest> request,
+int HistoryBackend::DeleteHistoryAndBookmarks(
const std::string& selection,
const std::vector<base::string16>& selection_args) {
- if (request->canceled())
- return;
-
int count = 0;
- bool result = false;
- if (android_provider_backend_)
- result = android_provider_backend_->DeleteHistoryAndBookmarks(selection,
- selection_args, &count);
-
- request->ForwardResult(request->handle(), result, count);
+ if (android_provider_backend_) {
+ android_provider_backend_->DeleteHistoryAndBookmarks(
+ selection, selection_args, &count);
+ }
+ return count;
}
-void HistoryBackend::DeleteHistory(
- scoped_refptr<DeleteRequest> request,
+int HistoryBackend::DeleteHistory(
const std::string& selection,
const std::vector<base::string16>& selection_args) {
- if (request->canceled())
- return;
-
int count = 0;
- bool result = false;
if (android_provider_backend_) {
- result = android_provider_backend_->DeleteHistory(selection, selection_args,
- &count);
+ android_provider_backend_->DeleteHistory(selection, selection_args, &count);
}
- request->ForwardResult(request->handle(), result, count);
+ return count;
}
// Statement -------------------------------------------------------------------
@@ -119,21 +108,15 @@ int HistoryBackend::UpdateSearchTerms(
return count;
}
-void HistoryBackend::DeleteSearchTerms(
- scoped_refptr<DeleteRequest> request,
+int HistoryBackend::DeleteSearchTerms(
const std::string& selection,
const std::vector<base::string16> selection_args) {
- if (request->canceled())
- return;
-
int count = 0;
- bool result = false;
if (android_provider_backend_) {
- result = android_provider_backend_->DeleteSearchTerms(selection,
- selection_args, &count);
+ android_provider_backend_->DeleteSearchTerms(
+ selection, selection_args, &count);
}
-
- request->ForwardResult(request->handle(), result, count);
+ return count;
}
AndroidStatement* HistoryBackend::QuerySearchTerms(
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698