| Index: mojo/common/dart/lib/trace_provider_impl.dart
|
| diff --git a/mojo/common/dart/lib/trace_controller_impl.dart b/mojo/common/dart/lib/trace_provider_impl.dart
|
| similarity index 52%
|
| rename from mojo/common/dart/lib/trace_controller_impl.dart
|
| rename to mojo/common/dart/lib/trace_provider_impl.dart
|
| index b56b4e25e2ffa08a3ea3a0e173608559e51bfee2..13901e09a7fae65ee43c800ecafe3369315dfad6 100644
|
| --- a/mojo/common/dart/lib/trace_controller_impl.dart
|
| +++ b/mojo/common/dart/lib/trace_provider_impl.dart
|
| @@ -9,38 +9,38 @@ import 'package:mojo/bindings.dart';
|
| import 'package:mojo/core.dart';
|
| import 'package:mojo_services/tracing/tracing.mojom.dart';
|
|
|
| -class TraceControllerImpl implements TraceController {
|
| - TraceControllerStub _stub;
|
| - TraceDataCollectorProxy _collector;
|
| +class TraceProviderImpl implements TraceProvider {
|
| + TraceProviderStub _stub;
|
| + TraceRecorderProxy _recorder;
|
| // TODO(rudominer) We currently ignore _categories.
|
| String _categories;
|
|
|
| - TraceControllerImpl.fromEndpoint(MojoMessagePipeEndpoint e) {
|
| - _stub = TraceControllerStub.newFromEndpoint(e);
|
| + TraceProviderImpl.fromEndpoint(MojoMessagePipeEndpoint e) {
|
| + _stub = TraceProviderStub.newFromEndpoint(e);
|
| _stub.impl = this;
|
| }
|
|
|
| @override
|
| - void startTracing(String categories, TraceDataCollectorProxy collector) {
|
| - assert(_collector == null);
|
| - _collector = collector;
|
| + void startTracing(String categories, TraceRecorderProxy recorder) {
|
| + assert(_recorder == null);
|
| + _recorder = recorder;
|
| _categories = categories;
|
| }
|
|
|
| @override
|
| void stopTracing() {
|
| - assert(_collector != null);
|
| - _collector.close();
|
| - _collector = null;
|
| + assert(_recorder != null);
|
| + _recorder.close();
|
| + _recorder = null;
|
| }
|
|
|
| bool isActive() {
|
| - return _collector != null;
|
| + return _recorder != null;
|
| }
|
|
|
| void sendTraceMessage(String message) {
|
| - if (_collector != null) {
|
| - _collector.ptr.dataCollected(message);
|
| + if (_recorder != null) {
|
| + _recorder.ptr.record(message);
|
| }
|
| }
|
| }
|
|
|