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

Side by Side Diff: base/test/user_action_tester.h

Issue 1859213002: Move the thread hop for UMA user actions from content:: to base::. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initializing in content. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
(...skipping 18 matching lines...) Expand all
29 29
30 private: 30 private:
31 typedef std::map<std::string, int> UserActionCountMap; 31 typedef std::map<std::string, int> UserActionCountMap;
32 32
33 // The callback that is notified when a user actions occurs. 33 // The callback that is notified when a user actions occurs.
34 void OnUserAction(const std::string& user_action); 34 void OnUserAction(const std::string& user_action);
35 35
36 // A map that tracks the number of times a user action has occurred. 36 // A map that tracks the number of times a user action has occurred.
37 UserActionCountMap count_map_; 37 UserActionCountMap count_map_;
38 38
39 // A test task runner used by user metrics.
40 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
41
39 // The callback that is added to the global action callback list. 42 // The callback that is added to the global action callback list.
40 base::ActionCallback action_callback_; 43 base::ActionCallback action_callback_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(UserActionTester); 45 DISALLOW_COPY_AND_ASSIGN(UserActionTester);
43 }; 46 };
44 47
45 } // namespace base 48 } // namespace base
46 49
47 #endif // BASE_TEST_USER_ACTION_TESTER_H_ 50 #endif // BASE_TEST_USER_ACTION_TESTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698