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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/barback_server.dart

Issue 216823006: Remove old web socket API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « no previous file | sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/barback_server.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/barback_server.dart b/sdk/lib/_internal/pub/lib/src/barback/barback_server.dart
index db4158d51379f27c7a54cea6962b245a22383a07..611d62ff1931fc51a014003636d0b910dc222f19 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/barback_server.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/barback_server.dart
@@ -17,7 +17,6 @@ import '../log.dart' as log;
import '../utils.dart';
import 'base_server.dart';
import 'build_environment.dart';
-import 'old_web_socket_api.dart';
/// Callback for determining if an asset with [id] should be served or not.
typedef bool AllowAsset(AssetId id);
@@ -95,13 +94,6 @@ class BarbackServer extends BaseServer<BarbackServerResult> {
/// Handles an HTTP request.
void handleRequest(HttpRequest request) {
- // TODO(rnystrom): Remove this when the Editor is using the admin server.
- // port. See #17640.
- if (WebSocketTransformer.isUpgradeRequest(request)) {
- _handleWebSocket(request);
- return;
- }
-
if (request.method != "GET" && request.method != "HEAD") {
methodNotAllowed(request);
return;
@@ -162,20 +154,6 @@ class BarbackServer extends BaseServer<BarbackServerResult> {
});
}
- // TODO(rnystrom): Remove this when the Editor is using the admin server.
- // port. See #17640.
- /// Creates a web socket for [request] which should be an upgrade request.
- void _handleWebSocket(HttpRequest request) {
- Chain.track(WebSocketTransformer.upgrade(request)).then((socket) {
- _webSockets.add(socket);
- var api = new OldWebSocketApi(socket, environment);
-
- return api.listen().whenComplete(() {
- _webSockets.remove(api);
- });
- }).catchError(addError);
- }
-
/// Serves the body of [asset] on [request]'s response stream.
///
/// Returns a future that completes when the response has been succesfully
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698