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

Unified Diff: chrome/browser/history/history_service.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/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index fe4aab27958fd1865b8390e0818cceef6be8b0ba..6291b4f6a5427b17ba6828e801dbee8934a8a68a 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -378,7 +378,7 @@ void HistoryService::URLsNoLongerBookmarked(const std::set<GURL>& urls) {
urls);
}
-void HistoryService::ScheduleDBTask(scoped_refptr<history::HistoryDBTask> task,
+void HistoryService::ScheduleDBTask(history::HistoryDBTask* task,
base::CancelableTaskTracker* tracker) {
DCHECK(thread_checker_.CalledOnValidThread());
base::CancelableTaskTracker::IsCanceledCallback is_canceled;
@@ -390,7 +390,7 @@ void HistoryService::ScheduleDBTask(scoped_refptr<history::HistoryDBTask> task,
FROM_HERE,
base::Bind(&HistoryBackend::ProcessDBTask,
history_backend_.get(),
- task,
+ base::Passed(make_scoped_ptr(task)),
base::ThreadTaskRunnerHandle::Get(),
is_canceled));
}

Powered by Google App Engine
This is Rietveld 408576698