diff options
author | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:46:03 +0000 |
---|---|---|
committer | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 21:46:03 +0000 |
commit | 243944fd54d7586087877dcb42bbad01b588f55e (patch) | |
tree | 0232a58b433efde257da0114c07427ebd9515621 /content/browser | |
parent | 09b50b424e41cf5de2aee805c8f227acf7cb31be (diff) | |
download | chromium_src-243944fd54d7586087877dcb42bbad01b588f55e.zip chromium_src-243944fd54d7586087877dcb42bbad01b588f55e.tar.gz chromium_src-243944fd54d7586087877dcb42bbad01b588f55e.tar.bz2 |
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
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/tracing/tracing_controller_impl.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc index 5365614..8bca4a0 100644 --- a/content/browser/tracing/tracing_controller_impl.cc +++ b/content/browser/tracing/tracing_controller_impl.cc @@ -430,14 +430,14 @@ bool TracingControllerImpl::GetTraceBufferPercentFull( pending_trace_buffer_percent_full_filters_ = trace_message_filters_; maximum_trace_buffer_percent_full_ = 0; - // Handle special case of zero child processes. - if (pending_trace_buffer_percent_full_ack_count_ == 1) { - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, - base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply, - base::Unretained(this), - scoped_refptr<TraceMessageFilter>(), - TraceLog::GetInstance()->GetBufferPercentFull())); - } + // Call OnTraceBufferPercentFullReply unconditionally for the browser process. + // This will result in immediate execution of the callback if there are no + // child processes. + BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, + base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply, + base::Unretained(this), + scoped_refptr<TraceMessageFilter>(), + TraceLog::GetInstance()->GetBufferPercentFull())); // Notify all child processes. for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); @@ -768,16 +768,6 @@ void TracingControllerImpl::OnTraceBufferPercentFullReply( maximum_trace_buffer_percent_full_); 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() { |