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

Unified Diff: chrome/browser/history/android/android_history_provider_service.h

Issue 365133003: Change AndroidHistoryProviderService to use CancelableTaskTracker (4/6) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancelable_task_tracker.4
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/android/android_history_provider_service.h
diff --git a/chrome/browser/history/android/android_history_provider_service.h b/chrome/browser/history/android/android_history_provider_service.h
index 557f7fb4b5b24c33d1b06209991e361a763de1af..8aa16298d9ac0b532af1fbe532c716fc44b2b4b4 100644
--- a/chrome/browser/history/android/android_history_provider_service.h
+++ b/chrome/browser/history/android/android_history_provider_service.h
@@ -36,12 +36,9 @@ class AndroidHistoryProviderService : public CancelableRequestProvider {
UpdateCallback;
typedef CancelableRequest<UpdateCallback> UpdateRequest;
- typedef base::Callback<void(
- Handle, // handle
- bool, // true if the insert succeeded.
- int64)> // the id of inserted row.
- InsertCallback;
- typedef CancelableRequest<InsertCallback> InsertRequest;
+ // Callback invoked when a method inserting rows in the database complete.
+ // The value is the new row id or 0 if the insertion failed.
+ typedef base::Callback<void(int64)> InsertCallback;
typedef base::Callback<void(
Handle, // handle
@@ -100,9 +97,10 @@ class AndroidHistoryProviderService : public CancelableRequestProvider {
// Inserts the given values into history backend, and invokes the |callback|
// to return the result.
- Handle InsertHistoryAndBookmark(const history::HistoryAndBookmarkRow& values,
- CancelableRequestConsumerBase* consumer,
- const InsertCallback& callback);
+ base::CancelableTaskTracker::TaskId InsertHistoryAndBookmark(
+ const history::HistoryAndBookmarkRow& values,
+ const InsertCallback& callback,
+ base::CancelableTaskTracker* tracker);
// Deletes the matched history and invokes |callback| to return the number of
// the row deleted from the |callback|.
@@ -129,9 +127,10 @@ class AndroidHistoryProviderService : public CancelableRequestProvider {
// Search term --------------------------------------------------------------
// Inserts the given values and returns the SearchTermID of the inserted row
// from the |callback| on success.
- Handle InsertSearchTerm(const history::SearchRow& row,
- CancelableRequestConsumerBase* consumer,
- const InsertCallback& callback);
+ base::CancelableTaskTracker::TaskId InsertSearchTerm(
+ const history::SearchRow& row,
+ const InsertCallback& callback,
+ base::CancelableTaskTracker* tracker);
// Runs the given update and returns the number of the update rows from the
// |callback| on success.

Powered by Google App Engine
This is Rietveld 408576698