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

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

Issue 352913002: Port HistoryService::ScheduleDBTask to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lifetime of base::CancelableTaskTracker for HistoryModelWorker Created 6 years, 6 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_service.cc ('k') | chrome/browser/history/in_memory_url_index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_unittest.cc
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index ff33dd8e074d32fc3da776e5fa4236c65034d52e..5c242665171687bdfb09bc456a2b69b5b5767fa8 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -1530,9 +1530,9 @@ const int HistoryDBTaskImpl::kWantInvokeCount = 2;
TEST_F(HistoryTest, HistoryDBTask) {
ASSERT_TRUE(history_service_.get());
- CancelableRequestConsumerT<int, 0> request_consumer;
+ base::CancelableTaskTracker task_tracker;
scoped_refptr<HistoryDBTaskImpl> task(new HistoryDBTaskImpl());
- history_service_->ScheduleDBTask(task.get(), &request_consumer);
+ history_service_->ScheduleDBTask(task.get(), &task_tracker);
// Run the message loop. When HistoryDBTaskImpl::DoneRunOnMainThread runs,
// it will stop the message loop. If the test hangs here, it means
// DoneRunOnMainThread isn't being invoked correctly.
@@ -1546,10 +1546,10 @@ TEST_F(HistoryTest, HistoryDBTask) {
TEST_F(HistoryTest, HistoryDBTaskCanceled) {
ASSERT_TRUE(history_service_.get());
- CancelableRequestConsumerT<int, 0> request_consumer;
+ base::CancelableTaskTracker task_tracker;
scoped_refptr<HistoryDBTaskImpl> task(new HistoryDBTaskImpl());
- history_service_->ScheduleDBTask(task.get(), &request_consumer);
- request_consumer.CancelAllRequests();
+ history_service_->ScheduleDBTask(task.get(), &task_tracker);
+ task_tracker.TryCancelAll();
CleanupHistoryService();
// WARNING: history has now been deleted.
history_service_.reset();
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/history/in_memory_url_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698