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

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

Issue 109933006: Implement sampling profiler (chromium side change) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: first CL Created 7 years 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
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index ba9f2e01ab1b88fe1104f123b98191e0b02d9087..ff025142f6b8de0a7444f4630eeed212ff963303 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -80,7 +80,7 @@ void TracingControllerImpl::ResultFile::OpenTask() {
void TracingControllerImpl::ResultFile::WriteTask(
const scoped_refptr<base::RefCountedString>& events_str_ptr) {
- if (!file_)
+ if (!file_ || !events_str_ptr->data().size())
return;
// If there is already a result in the file, then put a commma
@@ -423,7 +423,7 @@ void TracingControllerImpl::AddTraceMessageFilter(
trace_message_filter->SendSetWatchEvent(watch_category_name_,
watch_event_name_);
}
- if (can_disable_recording()) {
+ if (can_disable_recording() || can_disable_monitoring()) {
trace_message_filter->SendBeginTracing(
TraceLog::GetInstance()->GetCurrentCategoryFilter().ToString(),
TraceLog::GetInstance()->trace_options());

Powered by Google App Engine
This is Rietveld 408576698