Index: components/history/core/browser/history_service.cc |
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc |
index 2fc48f5af41090f9c70572c1f16fda31753e1266..ee6c58486bb08c9fdc21e3c0f943aeb6c2d01d33 100644 |
--- a/components/history/core/browser/history_service.cc |
+++ b/components/history/core/browser/history_service.cc |
@@ -655,6 +655,19 @@ base::CancelableTaskTracker::TaskId HistoryService::QueryURL( |
base::Owned(query_url_result))); |
} |
+// Statistics ------------------------------------------------------------------ |
+base::CancelableTaskTracker::TaskId HistoryService::CountURLs( |
+ const CountURLsCallback& callback, |
lwchkg
2015/08/11 15:54:51
Suggest to rename to GetHistoryCount. Mike and Jam
Mike Lerman
2015/08/13 14:56:33
GetHistoryCount or GetCountHistoryEntries (or simi
|
+ base::CancelableTaskTracker* tracker) { |
+ DCHECK(thread_) << "History service being called after cleanup"; |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ |
+ return tracker->PostTaskAndReplyWithResult( |
+ thread_->task_runner().get(), FROM_HERE, |
+ base::Bind(&HistoryBackend::CountURLs, history_backend_.get()), |
+ callback); |
+} |
+ |
// Downloads ------------------------------------------------------------------- |
// Handle creation of a download by creating an entry in the history service's |