| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_TEST_USER_ACTION_TESTER_H_ | 5 #ifndef BASE_TEST_USER_ACTION_TESTER_H_ |
| 6 #define BASE_TEST_USER_ACTION_TESTER_H_ | 6 #define BASE_TEST_USER_ACTION_TESTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" |
| 11 #include "base/metrics/user_metrics.h" | 12 #include "base/metrics/user_metrics.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 | 15 |
| 15 // This class observes and collects user action notifications that are sent | 16 // This class observes and collects user action notifications that are sent |
| 16 // by the tests, so that they can be examined afterwards for correctness. | 17 // by the tests, so that they can be examined afterwards for correctness. |
| 17 // Note: This class is NOT thread-safe. | 18 // Note: This class is NOT thread-safe. |
| 18 class UserActionTester { | 19 class UserActionTester { |
| 19 public: | 20 public: |
| 20 UserActionTester(); | 21 UserActionTester(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 // The callback that is added to the global action callback list. | 39 // The callback that is added to the global action callback list. |
| 39 base::ActionCallback action_callback_; | 40 base::ActionCallback action_callback_; |
| 40 | 41 |
| 41 DISALLOW_COPY_AND_ASSIGN(UserActionTester); | 42 DISALLOW_COPY_AND_ASSIGN(UserActionTester); |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace base | 45 } // namespace base |
| 45 | 46 |
| 46 #endif // BASE_TEST_USER_ACTION_TESTER_H_ | 47 #endif // BASE_TEST_USER_ACTION_TESTER_H_ |
| OLD | NEW |