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

Side by Side Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: rebase to tot Created 3 years, 8 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
« no previous file with comments | « content/browser/tracing/arc_tracing_agent.cc ('k') | 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/tracing/tracing_controller_impl.h" 4 #include "content/browser/tracing/tracing_controller_impl.h"
5 5
6 #include <algorithm> 6 #include <algorithm>
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 const std::string& events_label, 591 const std::string& events_label,
592 const scoped_refptr<base::RefCountedString>& events_str_ptr) { 592 const scoped_refptr<base::RefCountedString>& events_str_ptr) {
593 DCHECK_CURRENTLY_ON(BrowserThread::UI); 593 DCHECK_CURRENTLY_ON(BrowserThread::UI);
594 594
595 if (trace_data_sink_.get() && events_str_ptr && 595 if (trace_data_sink_.get() && events_str_ptr &&
596 !events_str_ptr->data().empty()) { 596 !events_str_ptr->data().empty()) {
597 if (agent_name == kETWTracingAgentName) { 597 if (agent_name == kETWTracingAgentName) {
598 // The Windows kernel events are kept into a JSON format stored as string 598 // The Windows kernel events are kept into a JSON format stored as string
599 // and must not be escaped. 599 // and must not be escaped.
600 trace_data_sink_->AddAgentTrace(events_label, events_str_ptr->data()); 600 trace_data_sink_->AddAgentTrace(events_label, events_str_ptr->data());
601 } else if (agent_name != kArcTracingAgentName) { 601 } else if (agent_name == kArcTracingAgentName) {
602 // ARC trace data is obtained via systrace. Ignore the empty data. 602 // The ARC events are kept into a JSON format stored as string
603 // Quote other trace data as JSON strings and merge them into 603 // and must not be escaped.
604 // |trace_data_sink_|. 604 trace_data_sink_->AddTraceChunk(events_str_ptr->data());
605 } else {
605 trace_data_sink_->AddAgentTrace( 606 trace_data_sink_->AddAgentTrace(
606 events_label, base::GetQuotedJSONString(events_str_ptr->data())); 607 events_label, base::GetQuotedJSONString(events_str_ptr->data()));
607 } 608 }
608 } 609 }
609 std::vector<std::string> category_groups; 610 std::vector<std::string> category_groups;
610 OnStopTracingAcked(NULL, category_groups); 611 OnStopTracingAcked(NULL, category_groups);
611 } 612 }
612 613
613 void TracingControllerImpl::OnTraceDataCollected( 614 void TracingControllerImpl::OnTraceDataCollected(
614 const scoped_refptr<base::RefCountedString>& events_str_ptr) { 615 const scoped_refptr<base::RefCountedString>& events_str_ptr) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 void TracingControllerImpl::RemoveTraceMessageFilterObserver( 917 void TracingControllerImpl::RemoveTraceMessageFilterObserver(
917 TraceMessageFilterObserver* observer) { 918 TraceMessageFilterObserver* observer) {
918 DCHECK_CURRENTLY_ON(BrowserThread::UI); 919 DCHECK_CURRENTLY_ON(BrowserThread::UI);
919 trace_message_filter_observers_.RemoveObserver(observer); 920 trace_message_filter_observers_.RemoveObserver(observer);
920 921
921 for (auto& filter : trace_message_filters_) 922 for (auto& filter : trace_message_filters_)
922 observer->OnTraceMessageFilterRemoved(filter.get()); 923 observer->OnTraceMessageFilterRemoved(filter.get());
923 } 924 }
924 925
925 } // namespace content 926 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/arc_tracing_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698