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

Unified Diff: base/test/test_mock_time_task_runner.cc

Issue 807503002: Implement throttling logic for fetching affiliation information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_database
Patch Set: Addressed first round of comments. Created 5 years, 11 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: base/test/test_mock_time_task_runner.cc
diff --git a/base/test/test_mock_time_task_runner.cc b/base/test/test_mock_time_task_runner.cc
index 169839124d9e29f7ea60ab4f356020ebcb5fb0f0..55264998636fa09f65b6982d015662a0f493514a 100644
--- a/base/test/test_mock_time_task_runner.cc
+++ b/base/test/test_mock_time_task_runner.cc
@@ -102,6 +102,11 @@ bool TestMockTimeTaskRunner::HasPendingTask() const {
return !tasks_.empty();
}
+size_t TestMockTimeTaskRunner::GetPendingTaskCount() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return !tasks_.size();
+}
+
TimeDelta TestMockTimeTaskRunner::NextPendingTaskDelay() const {
DCHECK(thread_checker_.CalledOnValidThread());
return tasks_.empty() ? TimeDelta::Max() : tasks_.top().GetTimeToRun() - now_;

Powered by Google App Engine
This is Rietveld 408576698