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

Unified Diff: chrome/browser/sync/test/integration/bookmarks_helper.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
Index: chrome/browser/sync/test/integration/bookmarks_helper.cc
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index 70c8ebb4535b08ff3099881bb508c24b802cc5ce..537169ac0243f7eb806f4a00c75a106f627b521a 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -13,6 +13,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
+#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
@@ -266,9 +267,8 @@ void WaitForHistoryToProcessPendingTasks() {
HistoryService* history_service =
HistoryServiceFactory::GetForProfileWithoutCreating(profile);
base::WaitableEvent done(false, false);
- CancelableRequestConsumer request_consumer;
- history_service->ScheduleDBTask(new HistoryEmptyTask(&done),
- &request_consumer);
+ base::CancelableTaskTracker task_tracker;
+ history_service->ScheduleDBTask(new HistoryEmptyTask(&done), &task_tracker);
done.Wait();
}
// Wait such that any notifications broadcast from one of the history threads

Powered by Google App Engine
This is Rietveld 408576698