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

Unified Diff: content/public/browser/tracing_controller.h

Issue 1468173003: [Tracing Clock Sync] Add TracingAgent interface in Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix Created 5 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
« no previous file with comments | « content/browser/tracing/tracing_controller_impl_data_sinks.cc ('k') | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/tracing_controller.h
diff --git a/content/public/browser/tracing_controller.h b/content/public/browser/tracing_controller.h
index 5525355613ecc039fae688fc3884d24ef4bcfd45..bfd3c42e341301649beb49ba387cdaa95b749cf3 100644
--- a/content/public/browser/tracing_controller.h
+++ b/content/public/browser/tracing_controller.h
@@ -41,7 +41,10 @@ class TracingController {
TraceDataSink();
virtual void AddTraceChunk(const std::string& chunk) {}
- virtual void SetSystemTrace(const std::string& data) {}
+
+ // Add a TracingAgent's trace to the data sink.
+ virtual void AddAgentTrace(const std::string& trace_label,
+ const std::string& trace_data);
// Notice that TracingController adds some default metadata when
// StopTracing is called, which may override metadata that you would
@@ -50,17 +53,20 @@ class TracingController {
virtual scoped_ptr<const base::DictionaryValue> GetMetadataCopy() const;
virtual void SetMetadataFilterPredicate(
const MetadataFilterPredicate& metadata_filter_predicate);
- // TODO(prabhur) Replace all the Set* functions with a generic function:
- // TraceDataSink::AppendAdditionalData(const std::string& name,
- // const std::string& trace_data)
- virtual void SetPowerTrace(const std::string& data) {}
virtual void Close() {}
protected:
friend class base::RefCountedThreadSafe<TraceDataSink>;
+
+ // Get a map of TracingAgent's data, which is previously added by
+ // AddAgentTrace(). The map's key is the trace label and the map's value is
+ // the trace data.
+ virtual const std::map<std::string, std::string>& GetAgentTrace() const;
+
virtual ~TraceDataSink();
private:
+ std::map<std::string, std::string> additional_tracing_agent_trace_;
MetadataFilterPredicate metadata_filter_predicate_;
base::DictionaryValue metadata_;
};
« no previous file with comments | « content/browser/tracing/tracing_controller_impl_data_sinks.cc ('k') | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698