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

Unified Diff: pkg/analysis_server/lib/src/channel/web_socket_channel.dart

Issue 801543002: Rework instrumentation API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean-up Created 6 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: pkg/analysis_server/lib/src/channel/web_socket_channel.dart
diff --git a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
index dce402e91fd61ba6b65d2bf072afda36b5ace170..b8ddf6d586e556bcdaf51d314611680ff5079731 100644
--- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
@@ -73,14 +73,14 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
final WebSocket socket;
/**
- * The instrumentation server that is to be used by this analysis server.
+ * The instrumentation service that is to be used by this analysis server.
*/
- final InstrumentationServer instrumentationServer;
+ final InstrumentationService instrumentationService;
/**
* Initialize a newly create [WebSocket] wrapper to wrap the given [socket].
*/
- WebSocketServerChannel(this.socket, this.instrumentationServer);
+ WebSocketServerChannel(this.socket, this.instrumentationService);
@override
void close() {
@@ -102,7 +102,7 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
*/
void readRequest(Object data, void onRequest(Request request)) {
if (data is String) {
- instrumentationServer.log(data);
+ instrumentationService.logRequest(data);
// Parse the string as a JSON descriptor and process the resulting
// structure as a request.
ServerCommunicationChannel.FromJson.start();
@@ -127,7 +127,7 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
String jsonEncoding = JSON.encode(notification.toJson());
ServerCommunicationChannel.ToJson.stop();
socket.add(jsonEncoding);
- instrumentationServer.log(jsonEncoding);
+ instrumentationService.logNotification(jsonEncoding);
}
@override
@@ -136,6 +136,6 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
String jsonEncoding = JSON.encode(response.toJson());
ServerCommunicationChannel.ToJson.stop();
socket.add(jsonEncoding);
- instrumentationServer.log(jsonEncoding);
+ instrumentationService.logResponse(jsonEncoding);
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/channel/byte_stream_channel.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698