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

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

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « pkg/analysis_server/lib/src/channel/channel.dart ('k') | pkg/analysis_server/lib/src/collections.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47af214ea041012feb69d2fe308582ed362ec1de..9dc4f00f194c0dfd18d5f530bd9f2d7555adb42a 100644
--- a/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/web_socket_channel.dart
@@ -13,7 +13,6 @@ import 'package:analysis_server/src/channel/channel.dart';
import 'package:analysis_server/src/protocol.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
-
/**
* Instances of the class [WebSocketClientChannel] implement a
* [ClientCommunicationChannel] that uses a [WebSocket] to communicate with
@@ -35,18 +34,19 @@ class WebSocketClientChannel implements ClientCommunicationChannel {
* Initialize a new [WebSocket] wrapper for the given [socket].
*/
WebSocketClientChannel(this.socket) {
- Stream jsonStream = socket.where(
- (data) =>
- data is String).transform(
- new JsonStreamDecoder()).where((json) => json is Map).asBroadcastStream();
- responseStream = jsonStream.where(
- (json) =>
- json[Notification.EVENT] ==
- null).transform(new ResponseConverter()).asBroadcastStream();
- notificationStream = jsonStream.where(
- (json) =>
- json[Notification.EVENT] !=
- null).transform(new NotificationConverter()).asBroadcastStream();
+ Stream jsonStream = socket
+ .where((data) => data is String)
+ .transform(new JsonStreamDecoder())
+ .where((json) => json is Map)
+ .asBroadcastStream();
+ responseStream = jsonStream
+ .where((json) => json[Notification.EVENT] == null)
+ .transform(new ResponseConverter())
+ .asBroadcastStream();
+ notificationStream = jsonStream
+ .where((json) => json[Notification.EVENT] != null)
+ .transform(new NotificationConverter())
+ .asBroadcastStream();
}
@override
@@ -89,12 +89,10 @@ class WebSocketServerChannel implements ServerCommunicationChannel {
}
@override
- void listen(void onRequest(Request request), {void onError(), void
- onDone()}) {
- socket.listen(
- (data) => readRequest(data, onRequest),
- onError: onError,
- onDone: onDone);
+ void listen(void onRequest(Request request),
+ {void onError(), void onDone()}) {
+ socket.listen((data) => readRequest(data, onRequest),
+ onError: onError, onDone: onDone);
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/channel/channel.dart ('k') | pkg/analysis_server/lib/src/collections.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698