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

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

Issue 366133003: Change AndroidHistoryProviderService to use CancelableTaskTracker (3/6) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancelable_task_tracker.3
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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 afe54b0210abff3b42b15340f756374076022f70..7752ef894c9db92f55633b3d0704c5782f9ae1c3 100644
--- a/chrome/browser/history/android/android_history_provider_service.h
+++ b/chrome/browser/history/android/android_history_provider_service.h
@@ -50,11 +50,10 @@ class AndroidHistoryProviderService : public CancelableRequestProvider {
DeleteCallback;
typedef CancelableRequest<DeleteCallback> DeleteRequest;
- typedef base::Callback<void(
- Handle, // handle
- int)> // the new position.
- MoveStatementCallback;
- typedef CancelableRequest<MoveStatementCallback> MoveStatementRequest;
+ // Callback invoked when a method moving an |AndroidStatement| is complete.
+ // The value passed to the callback is the new position, or in case of
+ // failure, the old position.
+ typedef base::Callback<void(int)> MoveStatementCallback;
// History and Bookmarks ----------------------------------------------------
//
@@ -116,11 +115,12 @@ class AndroidHistoryProviderService : public CancelableRequestProvider {
// Moves the statement's current row from |current_pos| to |destination| in DB
// thread. The new position is returned to the callback. The result supplied
// the callback is constrained by the number of rows might.
- Handle MoveStatement(history::AndroidStatement* statement,
- int current_pos,
- int destination,
- CancelableRequestConsumerBase* consumer,
- const MoveStatementCallback& callback);
+ base::CancelableTaskTracker::TaskId MoveStatement(
+ history::AndroidStatement* statement,
+ int current_pos,
+ int destination,
+ const MoveStatementCallback& callback,
+ base::CancelableTaskTracker* tracker);
// Closes the statement in db thread. The AndroidHistoryProviderService takes
// the ownership of |statement|.
« no previous file with comments | « no previous file | chrome/browser/history/android/android_history_provider_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698