Commit 243944fd authored by marshall@chromium.org's avatar marshall@chromium.org

Fix delivery of percent full notifications from TracingController. This was...

Fix delivery of percent full notifications from TracingController. This was broken by revision 242806.

BUG=332056
TEST=Record with about:tracing

Review URL: https://codereview.chromium.org/128403006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243984 0039d316-1c4b-4281-b951-d872f2087c98
parent 09b50b42
...@@ -430,14 +430,14 @@ bool TracingControllerImpl::GetTraceBufferPercentFull( ...@@ -430,14 +430,14 @@ bool TracingControllerImpl::GetTraceBufferPercentFull(
pending_trace_buffer_percent_full_filters_ = trace_message_filters_; pending_trace_buffer_percent_full_filters_ = trace_message_filters_;
maximum_trace_buffer_percent_full_ = 0; maximum_trace_buffer_percent_full_ = 0;
// Handle special case of zero child processes. // Call OnTraceBufferPercentFullReply unconditionally for the browser process.
if (pending_trace_buffer_percent_full_ack_count_ == 1) { // This will result in immediate execution of the callback if there are no
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, // child processes.
base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply, BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Unretained(this), base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
scoped_refptr<TraceMessageFilter>(), base::Unretained(this),
TraceLog::GetInstance()->GetBufferPercentFull())); scoped_refptr<TraceMessageFilter>(),
} TraceLog::GetInstance()->GetBufferPercentFull()));
// Notify all child processes. // Notify all child processes.
for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
...@@ -768,16 +768,6 @@ void TracingControllerImpl::OnTraceBufferPercentFullReply( ...@@ -768,16 +768,6 @@ void TracingControllerImpl::OnTraceBufferPercentFullReply(
maximum_trace_buffer_percent_full_); maximum_trace_buffer_percent_full_);
pending_trace_buffer_percent_full_callback_.Reset(); pending_trace_buffer_percent_full_callback_.Reset();
} }
if (pending_trace_buffer_percent_full_ack_count_ == 1) {
// The last ack represents local trace, so we need to ack it now. Note that
// this code only executes if there were child processes.
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
base::Unretained(this),
make_scoped_refptr(trace_message_filter),
TraceLog::GetInstance()->GetBufferPercentFull()));
}
} }
void TracingControllerImpl::OnWatchEventMatched() { void TracingControllerImpl::OnWatchEventMatched() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment