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

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

Issue 330703005: Revert of Change HistoryService::QueryURL to use CancelableTaskTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.h ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index ebff8897c70ad06f884477f4ed50e45e6f82db64..1a3ac9ebd178fb01561d9320731ab51407260dd3 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -80,11 +80,6 @@
callback.Run(*bitmap_result);
}
-void RunWithQueryURLResult(const HistoryService::QueryURLCallback& callback,
- const HistoryBackend::QueryURLResult& result) {
- callback.Run(result.success, result.row, result.visits);
-}
-
// Extract history::URLRows into GURLs for VisitedLinkMaster.
class URLIteratorFromURLRows
: public visitedlink::VisitedLinkMaster::URLIterator {
@@ -708,18 +703,14 @@
&HistoryBackend::SetImportedFavicons, favicon_usage);
}
-base::CancelableTaskTracker::TaskId HistoryService::QueryURL(
+HistoryService::Handle HistoryService::QueryURL(
const GURL& url,
bool want_visits,
- const QueryURLCallback& callback,
- base::CancelableTaskTracker* tracker) {
- DCHECK(thread_checker_.CalledOnValidThread());
- return PostTaskAndReplyWithResult(
- thread_->message_loop_proxy().get(),
- FROM_HERE,
- base::Bind(
- &HistoryBackend::QueryURL, history_backend_.get(), url, want_visits),
- base::Bind(&RunWithQueryURLResult, callback));
+ CancelableRequestConsumerBase* consumer,
+ const QueryURLCallback& callback) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return Schedule(PRIORITY_UI, &HistoryBackend::QueryURL, consumer,
+ new history::QueryURLRequest(callback), url, want_visits);
}
// Downloads -------------------------------------------------------------------
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698