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

Unified Diff: base/test/task_runner_test_template.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « base/test/task_runner_test_template.h ('k') | base/test/test_discardable_memory_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/task_runner_test_template.cc
diff --git a/base/test/task_runner_test_template.cc b/base/test/task_runner_test_template.cc
deleted file mode 100644
index b756203c44d751bc16f954544ac06960b41fba4b..0000000000000000000000000000000000000000
--- a/base/test/task_runner_test_template.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/test/task_runner_test_template.h"
-
-namespace base {
-
-namespace internal {
-
-TaskTracker::TaskTracker() : task_runs_(0), task_runs_cv_(&lock_) {}
-
-TaskTracker::~TaskTracker() {}
-
-Closure TaskTracker::WrapTask(const Closure& task, int i) {
- return Bind(&TaskTracker::RunTask, this, task, i);
-}
-
-void TaskTracker::RunTask(const Closure& task, int i) {
- AutoLock lock(lock_);
- if (!task.is_null()) {
- task.Run();
- }
- ++task_run_counts_[i];
- ++task_runs_;
- task_runs_cv_.Signal();
-}
-
-std::map<int, int> TaskTracker::GetTaskRunCounts() const {
- AutoLock lock(lock_);
- return task_run_counts_;
-}
-
-void TaskTracker::WaitForCompletedTasks(int count) {
- AutoLock lock(lock_);
- while (task_runs_ < count)
- task_runs_cv_.Wait();
-}
-
-void ExpectRunsTasksOnCurrentThread(
- bool expected_value,
- const scoped_refptr<TaskRunner>& task_runner) {
- EXPECT_EQ(expected_value, task_runner->RunsTasksOnCurrentThread());
-}
-
-} // namespace internal
-
-} // namespace base
« no previous file with comments | « base/test/task_runner_test_template.h ('k') | base/test/test_discardable_memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698