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

Unified Diff: base/test/user_action_tester.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/user_action_tester.h ('k') | base/test/user_action_tester_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/user_action_tester.cc
diff --git a/base/test/user_action_tester.cc b/base/test/user_action_tester.cc
deleted file mode 100644
index 3fdab121b4756f23be40a5b903a8825f69b01f12..0000000000000000000000000000000000000000
--- a/base/test/user_action_tester.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2015 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/user_action_tester.h"
-
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-
-namespace base {
-
-UserActionTester::UserActionTester()
- : action_callback_(
- base::Bind(&UserActionTester::OnUserAction, base::Unretained(this))) {
- base::AddActionCallback(action_callback_);
-}
-
-UserActionTester::~UserActionTester() {
- base::RemoveActionCallback(action_callback_);
-}
-
-int UserActionTester::GetActionCount(const std::string& user_action) const {
- UserActionCountMap::const_iterator iter = count_map_.find(user_action);
- return iter == count_map_.end() ? 0 : iter->second;
-}
-
-void UserActionTester::ResetCounts() {
- count_map_.clear();
-}
-
-void UserActionTester::OnUserAction(const std::string& user_action) {
- ++(count_map_[user_action]);
-}
-
-} // namespace base
« no previous file with comments | « base/test/user_action_tester.h ('k') | base/test/user_action_tester_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698