Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 128403006: Fix delivery of percent full notifications from TracingController. This was broken by revision 2428… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.cc
===================================================================
--- content/browser/tracing/tracing_controller_impl.cc (revision 243519)
+++ content/browser/tracing/tracing_controller_impl.cc (working copy)
@@ -424,14 +424,14 @@
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();
@@ -757,16 +757,6 @@
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698