OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ | 5 #ifndef COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ |
6 #define COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ | 6 #define COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 return ipc_task_runner_; | 36 return ipc_task_runner_; |
37 } | 37 } |
38 | 38 |
39 protected: | 39 protected: |
40 ~ChildTraceMessageFilter() override; | 40 ~ChildTraceMessageFilter() override; |
41 | 41 |
42 private: | 42 private: |
43 friend class ChildTraceMessageFilterTest; | 43 friend class ChildTraceMessageFilterTest; |
44 | 44 |
45 // Message handlers. | 45 // Message handlers. |
46 void OnBeginTracing(const std::string& trace_config_str, | |
47 base::TimeTicks browser_time, | |
48 uint64_t tracing_process_id); | |
49 void OnEndTracing(); | |
50 void OnCancelTracing(); | |
51 void OnGetTraceLogStatus(); | |
52 void OnSetWatchEvent(const std::string& category_name, | |
53 const std::string& event_name); | |
54 void OnCancelWatchEvent(); | |
55 void OnWatchEventMatched(); | |
56 void OnSetUMACallback(const std::string& histogram_name, | 46 void OnSetUMACallback(const std::string& histogram_name, |
57 int histogram_lower_value, | 47 int histogram_lower_value, |
58 int histogram_upper_value, | 48 int histogram_upper_value, |
59 bool repeat); | 49 bool repeat); |
60 void OnClearUMACallback(const std::string& histogram_name); | 50 void OnClearUMACallback(const std::string& histogram_name); |
61 void OnHistogramChanged(const std::string& histogram_name, | 51 void OnHistogramChanged(const std::string& histogram_name, |
62 base::Histogram::Sample reference_lower_value, | 52 base::Histogram::Sample reference_lower_value, |
63 base::Histogram::Sample reference_upper_value, | 53 base::Histogram::Sample reference_upper_value, |
64 bool repeat, | 54 bool repeat, |
65 base::Histogram::Sample actual_value); | 55 base::Histogram::Sample actual_value); |
66 void SendTriggerMessage(const std::string& histogram_name); | 56 void SendTriggerMessage(const std::string& histogram_name); |
67 void SendAbortBackgroundTracingMessage(); | 57 void SendAbortBackgroundTracingMessage(); |
68 | 58 |
69 // Callback from trace subsystem. | |
70 void OnTraceDataCollected( | |
71 const scoped_refptr<base::RefCountedString>& events_str_ptr, | |
72 bool has_more_events); | |
73 | |
74 void SetSenderForTesting(IPC::Sender* sender); | 59 void SetSenderForTesting(IPC::Sender* sender); |
75 | 60 |
76 uint8_t enabled_tracing_modes_; | |
77 | |
78 IPC::Sender* sender_; | 61 IPC::Sender* sender_; |
79 base::SingleThreadTaskRunner* ipc_task_runner_; | 62 base::SingleThreadTaskRunner* ipc_task_runner_; |
80 | 63 |
81 base::Time histogram_last_changed_; | 64 base::Time histogram_last_changed_; |
82 | 65 |
83 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); | 66 DISALLOW_COPY_AND_ASSIGN(ChildTraceMessageFilter); |
84 }; | 67 }; |
85 | 68 |
86 } // namespace tracing | 69 } // namespace tracing |
87 | 70 |
88 #endif // COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ | 71 #endif // COMPONENTS_TRACING_CHILD_CHILD_TRACE_MESSAGE_FILTER_H_ |
OLD | NEW |