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

Unified Diff: services/resource_coordinator/public/interfaces/tracing/tracing.mojom

Issue 2878533003: tracing: the client lib of the tracing service (Closed)
Patch Set: review Created 3 years, 7 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 | « services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/resource_coordinator/public/interfaces/tracing/tracing.mojom
diff --git a/services/resource_coordinator/public/interfaces/tracing/tracing.mojom b/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
index fb8cd3cbac55e130bd256d99acf7e8df6844c50c..bdddac8e5a1fabebfb3fd62e6d4e7a59f22d93dc 100644
--- a/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
+++ b/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-module resource_coordinator.tracing.mojom;
+module tracing.mojom;
import "mojo/common/time.mojom";
import "mojo/common/values.mojom";
@@ -20,22 +20,29 @@ enum TraceDataType {
// Tracing agents, like |chrome|, |etw|, |battor|, and |cros|, use this
// interface to register themselves to the tracing service.
-interface Factory {
- RegisterAgent(Agent agent, string name, string label, TraceDataType type,
+//
+// This is a separate interface from |Coordinator| for security and privacy
+// reasones: although we want to let almost every process be able to send
kenrb 2017/05/17 21:24:02 nit: s/reasones/reasons
chiniforooshan 2017/05/17 21:33:17 Done.
+// tracing data to the service, we do not want to let an untrusted child process
+// be able to collect traces from other processes using the |Coordinator|
+// interface.
+interface AgentRegistry {
+ RegisterAgent(Agent agent, string label, TraceDataType type,
bool supports_explicit_clock_sync_);
};
-// There should be at most one implementation of this interface per process.
// When the tracing service calls |StopAndFlush| on an agent, the agent begins
// serializing data into the recorder that was given in the |StartTracing| call.
// When finished, the agent should close the recorder connection to signal the
// tracing service that no more data will be sent.
interface Agent {
- StartTracing(string categories, Recorder recorder);
+ StartTracing(string config, Recorder recorder) => ();
StopAndFlush();
- RequestClockSyncMarker() => (mojo.common.mojom.TimeTicks issue_ts,
- mojo.common.mojom.TimeTicks issue_end_ts);
+ RequestClockSyncMarker(string sync_id) => (
+ mojo.common.mojom.TimeTicks issue_ts,
+ mojo.common.mojom.TimeTicks issue_end_ts);
RequestBufferStatus() => (uint32 capacity, uint32 count);
+ GetCategories() => (string categories);
};
// An agent can make several calls to |AddChunk|. Chunks will be concatenated
@@ -51,8 +58,10 @@ interface Recorder {
// from all registered agents. At any given time, there should be at most one
// connected controller.
interface Coordinator {
kenrb 2017/05/17 21:24:02 How do you prevent renderer processes from being a
chiniforooshan 2017/05/17 21:33:17 Isn't it enough that we don't "provide" the Coordi
kenrb 2017/05/18 02:19:52 Yes, thanks, this is right, sorry about my confusi
chiniforooshan 2017/05/18 15:23:49 Acknowledged.
- StartTracing(handle<data_pipe_producer> stream, string categories);
+ StartTracing(handle<data_pipe_producer> stream, string config);
StopAndFlush();
IsTracing() => (bool is_tracing);
- RequestBufferUsage() => (float percent_full, uint32 approximate_count);
+ RequestBufferUsage() => (bool success, float percent_full,
+ uint32 approximate_count);
+ GetCategories() => (string categories);
};
« no previous file with comments | « services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698