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 #include "content/browser/trace_message_filter.h" | 5 #include "content/browser/trace_message_filter.h" |
6 | 6 |
7 #include "components/tracing/tracing_messages.h" | 7 #include "components/tracing/tracing_messages.h" |
8 #include "content/browser/trace_controller_impl.h" | 8 #include "content/browser/trace_controller_impl.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceNotification, | 48 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceNotification, |
49 OnTraceNotification) | 49 OnTraceNotification) |
50 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply, | 50 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply, |
51 OnTraceBufferPercentFullReply) | 51 OnTraceBufferPercentFullReply) |
52 IPC_MESSAGE_UNHANDLED(handled = false) | 52 IPC_MESSAGE_UNHANDLED(handled = false) |
53 IPC_END_MESSAGE_MAP_EX() | 53 IPC_END_MESSAGE_MAP_EX() |
54 return handled; | 54 return handled; |
55 } | 55 } |
56 | 56 |
57 void TraceMessageFilter::SendBeginTracing( | 57 void TraceMessageFilter::SendBeginTracing( |
58 const std::vector<std::string>& included_categories, | 58 const std::vector<std::string>& included_tag_patterns, |
59 const std::vector<std::string>& excluded_categories) { | 59 const std::vector<std::string>& excluded_tag_patterns) { |
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
61 Send(new TracingMsg_BeginTracing(included_categories, | 61 Send(new TracingMsg_BeginTracing(included_tag_patterns, |
62 excluded_categories, | 62 excluded_tag_patterns, |
63 base::TimeTicks::NowFromSystemTraceTime())); | 63 base::TimeTicks::NowFromSystemTraceTime())); |
64 } | 64 } |
65 | 65 |
66 void TraceMessageFilter::SendEndTracing() { | 66 void TraceMessageFilter::SendEndTracing() { |
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
68 DCHECK(!is_awaiting_end_ack_); | 68 DCHECK(!is_awaiting_end_ack_); |
69 is_awaiting_end_ack_ = true; | 69 is_awaiting_end_ack_ = true; |
70 Send(new TracingMsg_EndTracing); | 70 Send(new TracingMsg_EndTracing); |
71 } | 71 } |
72 | 72 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 if (is_awaiting_buffer_percent_full_ack_) { | 119 if (is_awaiting_buffer_percent_full_ack_) { |
120 is_awaiting_buffer_percent_full_ack_ = false; | 120 is_awaiting_buffer_percent_full_ack_ = false; |
121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( | 121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( |
122 percent_full); | 122 percent_full); |
123 } else { | 123 } else { |
124 NOTREACHED(); | 124 NOTREACHED(); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 } // namespace content | 128 } // namespace content |
OLD | NEW |