OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/trace_controller.h" | 7 #include "content/browser/trace_controller.h" |
8 #include "content/common/child_process_messages.h" | 8 #include "content/common/child_process_messages.h" |
9 | 9 |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 void TraceMessageFilter::OnEndTracingAck() { | 75 void TraceMessageFilter::OnEndTracingAck() { |
76 // is_awaiting_end_ack_ should always be true here, but check in case the | 76 // is_awaiting_end_ack_ should always be true here, but check in case the |
77 // child process is compromised. | 77 // child process is compromised. |
78 if (is_awaiting_end_ack_) { | 78 if (is_awaiting_end_ack_) { |
79 is_awaiting_end_ack_ = false; | 79 is_awaiting_end_ack_ = false; |
80 TraceController::GetInstance()->OnEndTracingAck(); | 80 TraceController::GetInstance()->OnEndTracingAck(); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) { | 84 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) { |
85 TraceController::GetInstance()->OnTraceDataCollected(data); | 85 TraceController::GetInstance()->OnTraceDataCollected( |
86 make_scoped_refptr(new base::debug::TraceLog::RefCountedString(data))); | |
Sigurður Ásgeirsson
2011/05/04 18:58:09
nit: indent
scheib
2011/05/05 00:06:37
Done.
| |
86 } | 87 } |
87 | 88 |
88 void TraceMessageFilter::OnTraceBufferFull() { | 89 void TraceMessageFilter::OnTraceBufferFull() { |
89 TraceController::GetInstance()->OnTraceBufferFull(); | 90 TraceController::GetInstance()->OnTraceBufferFull(); |
90 } | 91 } |
91 | 92 |
92 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) { | 93 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) { |
93 if (is_awaiting_bpf_ack_) { | 94 if (is_awaiting_bpf_ack_) { |
94 is_awaiting_bpf_ack_ = false; | 95 is_awaiting_bpf_ack_ = false; |
95 TraceController::GetInstance()->OnTraceBufferPercentFullReply( | 96 TraceController::GetInstance()->OnTraceBufferPercentFullReply( |
96 percent_full); | 97 percent_full); |
97 } | 98 } |
98 } | 99 } |
99 | 100 |
OLD | NEW |