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::TraceMode mode) { |
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
61 Send(new TracingMsg_BeginTracing(included_categories, | 62 Send(new TracingMsg_BeginTracing( |
62 excluded_categories, | 63 included_categories, |
63 base::TimeTicks::NowFromSystemTraceTime())); | 64 excluded_categories, |
| 65 base::TimeTicks::NowFromSystemTraceTime(), |
| 66 base::debug::TraceLog::StringFromTraceMode(mode))); |
64 } | 67 } |
65 | 68 |
66 void TraceMessageFilter::SendEndTracing() { | 69 void TraceMessageFilter::SendEndTracing() { |
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 70 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
68 DCHECK(!is_awaiting_end_ack_); | 71 DCHECK(!is_awaiting_end_ack_); |
69 is_awaiting_end_ack_ = true; | 72 is_awaiting_end_ack_ = true; |
70 Send(new TracingMsg_EndTracing); | 73 Send(new TracingMsg_EndTracing); |
71 } | 74 } |
72 | 75 |
73 void TraceMessageFilter::SendGetTraceBufferPercentFull() { | 76 void TraceMessageFilter::SendGetTraceBufferPercentFull() { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 if (is_awaiting_buffer_percent_full_ack_) { | 122 if (is_awaiting_buffer_percent_full_ack_) { |
120 is_awaiting_buffer_percent_full_ack_ = false; | 123 is_awaiting_buffer_percent_full_ack_ = false; |
121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( | 124 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( |
122 percent_full); | 125 percent_full); |
123 } else { | 126 } else { |
124 NOTREACHED(); | 127 NOTREACHED(); |
125 } | 128 } |
126 } | 129 } |
127 | 130 |
128 } // namespace content | 131 } // namespace content |
OLD | NEW |