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

Unified Diff: chrome/browser/history/android/sqlite_cursor_unittest.cc

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: 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
Index: chrome/browser/history/android/sqlite_cursor_unittest.cc
diff --git a/chrome/browser/history/android/sqlite_cursor_unittest.cc b/chrome/browser/history/android/sqlite_cursor_unittest.cc
index 2fe66a9b9e1d7aee7ce77fb8026235ed4bbe840e..7b1b4aaf45fb89910be129cddd9581ed58140b70 100644
--- a/chrome/browser/history/android/sqlite_cursor_unittest.cc
+++ b/chrome/browser/history/android/sqlite_cursor_unittest.cc
@@ -129,10 +129,8 @@ class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> {
return statement_;
}
- void OnInserted(AndroidHistoryProviderService::Handle handle,
- bool success,
- int64 id) {
- success_ = success;
+ void OnInserted(int64 id) {
+ success_ = id != 0;
base::MessageLoop::current()->Quit();
}
@@ -170,8 +168,10 @@ TEST_F(SQLiteCursorTest, Run) {
scoped_refptr<CallbackHelper> callback(new CallbackHelper());
// Insert a row and verify it succeeded.
- service_->InsertHistoryAndBookmark(row, &cancelable_consumer_,
- Bind(&CallbackHelper::OnInserted, callback.get()));
+ service_->InsertHistoryAndBookmark(
+ row,
+ Bind(&CallbackHelper::OnInserted, callback.get()),
+ &cancelable_tracker_);
base::MessageLoop::current()->Run();
EXPECT_TRUE(callback->success());
« no previous file with comments | « chrome/browser/history/android/android_history_provider_service_unittest.cc ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698