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/tracing/trace_message_filter.h" | 5 #include "content/browser/tracing/trace_message_filter.h" |
6 | 6 |
7 #include "components/tracing/tracing_messages.h" | 7 #include "components/tracing/tracing_messages.h" |
8 #include "content/browser/tracing/trace_controller_impl.h" | 8 #include "content/browser/tracing/trace_controller_impl.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_categories, |
59 const std::vector<std::string>& excluded_categories) { | 59 const std::vector<std::string>& excluded_categories, |
| 60 base::debug::TraceLog::Options options) { |
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
61 Send(new TracingMsg_BeginTracing(included_categories, | 62 Send(new TracingMsg_BeginTracing(included_categories, excluded_categories, |
62 excluded_categories, | 63 base::TimeTicks::NowFromSystemTraceTime(), |
63 base::TimeTicks::NowFromSystemTraceTime())); | 64 options)); |
64 } | 65 } |
65 | 66 |
66 void TraceMessageFilter::SendEndTracing() { | 67 void TraceMessageFilter::SendEndTracing() { |
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
68 DCHECK(!is_awaiting_end_ack_); | 69 DCHECK(!is_awaiting_end_ack_); |
69 is_awaiting_end_ack_ = true; | 70 is_awaiting_end_ack_ = true; |
70 Send(new TracingMsg_EndTracing); | 71 Send(new TracingMsg_EndTracing); |
71 } | 72 } |
72 | 73 |
73 void TraceMessageFilter::SendGetTraceBufferPercentFull() { | 74 void TraceMessageFilter::SendGetTraceBufferPercentFull() { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 if (is_awaiting_buffer_percent_full_ack_) { | 120 if (is_awaiting_buffer_percent_full_ack_) { |
120 is_awaiting_buffer_percent_full_ack_ = false; | 121 is_awaiting_buffer_percent_full_ack_ = false; |
121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( | 122 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( |
122 percent_full); | 123 percent_full); |
123 } else { | 124 } else { |
124 NOTREACHED(); | 125 NOTREACHED(); |
125 } | 126 } |
126 } | 127 } |
127 | 128 |
128 } // namespace content | 129 } // namespace content |
OLD | NEW |