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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tracing_controller_impl.h" 5 #include "content/browser/tracing/tracing_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 maximum_trace_buffer_percent_full_); 757 maximum_trace_buffer_percent_full_);
758 pending_trace_buffer_percent_full_callback_.Reset(); 758 pending_trace_buffer_percent_full_callback_.Reset();
759 } 759 }
760 760
761 if (pending_trace_buffer_percent_full_ack_count_ == 1) { 761 if (pending_trace_buffer_percent_full_ack_count_ == 1) {
762 // The last ack represents local trace, so we need to ack it now. Note that 762 // The last ack represents local trace, so we need to ack it now. Note that
763 // this code only executes if there were child processes. 763 // this code only executes if there were child processes.
764 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 764 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
765 base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply, 765 base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
766 base::Unretained(this), 766 base::Unretained(this),
767 make_scoped_refptr(trace_message_filter), 767 scoped_refptr<TraceMessageFilter>(),
768 TraceLog::GetInstance()->GetBufferPercentFull())); 768 TraceLog::GetInstance()->GetBufferPercentFull()));
Xianzhu 2014/01/08 20:58:16 It seems that we could call TraceLog::GetInstance-
Marshall 2014/01/09 17:09:09 Done.
769 } 769 }
770 } 770 }
771 771
772 void TracingControllerImpl::OnWatchEventMatched() { 772 void TracingControllerImpl::OnWatchEventMatched() {
773 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 773 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
774 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 774 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
775 base::Bind(&TracingControllerImpl::OnWatchEventMatched, 775 base::Bind(&TracingControllerImpl::OnWatchEventMatched,
776 base::Unretained(this))); 776 base::Unretained(this)));
777 return; 777 return;
778 } 778 }
779 779
780 if (!watch_event_callback_.is_null()) 780 if (!watch_event_callback_.is_null())
781 watch_event_callback_.Run(); 781 watch_event_callback_.Run();
782 } 782 }
783 783
784 } // namespace content 784 } // namespace content
OLDNEW
« 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