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

Unified Diff: chrome/browser/sync/profile_sync_service_typed_url_unittest.cc

Issue 387923002: Make HistoryDBTask not refcounted, and ensure it's destroyed on its origin thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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/sync/profile_sync_service_typed_url_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index f49b30868356923706d77f2081808c22a715562b..b4bb3eb9ac77edb7cd694546615079b6af140666 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -114,7 +114,7 @@ class HistoryServiceMock : public HistoryService {
explicit HistoryServiceMock(history::HistoryClient* client, Profile* profile)
: HistoryService(client, profile) {}
MOCK_METHOD2(ScheduleDBTask,
- void(scoped_refptr<history::HistoryDBTask>,
+ void(history::HistoryDBTask*,
base::CancelableTaskTracker*));
MOCK_METHOD0(Shutdown, void());
@@ -152,14 +152,15 @@ class TestTypedUrlModelAssociator : public TypedUrlModelAssociator {
};
void RunOnDBThreadCallback(HistoryBackend* backend,
- scoped_refptr<history::HistoryDBTask> task) {
+ scoped_ptr<history::HistoryDBTask> task) {
task->RunOnDBThread(backend, NULL);
}
ACTION_P2(RunTaskOnDBThread, thread, backend) {
thread->message_loop()->PostTask(
FROM_HERE,
- base::Bind(&RunOnDBThreadCallback, base::Unretained(backend), arg0));
+ base::Bind(&RunOnDBThreadCallback, base::Unretained(backend),
+ base::Passed(make_scoped_ptr(arg0))));
}
ACTION_P2(ShutdownHistoryService, thread, service) {
« chrome/browser/history/history_service.h ('K') | « chrome/browser/sync/glue/history_model_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698