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

Unified Diff: components/history/core/browser/history_service.cc

Issue 1248613003: Issue 501916 : Add data type counts to profile deletion flow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Seventh draft Created 5 years, 4 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: 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

Powered by Google App Engine
This is Rietveld 408576698