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

Side by Side Diff: sdk/lib/vmservice/message.dart

Issue 2225583002: Support devFS writes via HTTP PUT (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rmacnak review Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/vmservice/devfs.dart ('k') | sdk/lib/vmservice/vmservice.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart._vmservice; 5 part of dart._vmservice;
6 6
7 class Message { 7 class Message {
8 final Completer _completer = new Completer.sync(); 8 final Completer _completer = new Completer.sync();
9 bool get completed => _completer.isCompleted; 9 bool get completed => _completer.isCompleted;
10 /// Future of response. 10 /// Future of response.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 static String _methodNameFromUri(Uri uri) { 44 static String _methodNameFromUri(Uri uri) {
45 if (uri == null) { 45 if (uri == null) {
46 return ''; 46 return '';
47 } 47 }
48 if (uri.pathSegments.length == 0) { 48 if (uri.pathSegments.length == 0) {
49 return ''; 49 return '';
50 } 50 }
51 return uri.pathSegments[0]; 51 return uri.pathSegments[0];
52 } 52 }
53 53
54 Message.forMethod(String method)
55 : client = null, method = method, serial = '';
56
54 Message.fromUri(this.client, Uri uri) 57 Message.fromUri(this.client, Uri uri)
55 : serial = '', method = _methodNameFromUri(uri) { 58 : serial = '', method = _methodNameFromUri(uri) {
56 params.addAll(uri.queryParameters); 59 params.addAll(uri.queryParameters);
57 } 60 }
58 61
59 Message.forIsolate(this.client, Uri uri, RunningIsolate isolate) 62 Message.forIsolate(this.client, Uri uri, RunningIsolate isolate)
60 : serial = '', method = _methodNameFromUri(uri) { 63 : serial = '', method = _methodNameFromUri(uri) {
61 params.addAll(uri.queryParameters); 64 params.addAll(uri.queryParameters);
62 params['isolateId'] = isolate.serviceId; 65 params['isolateId'] = isolate.serviceId;
63 } 66 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 180
178 void setErrorResponse(int code, String details) { 181 void setErrorResponse(int code, String details) {
179 _completer.complete(encodeRpcError(this, code, 182 _completer.complete(encodeRpcError(this, code,
180 details: '$method: $details')); 183 details: '$method: $details'));
181 } 184 }
182 } 185 }
183 186
184 external bool sendIsolateServiceMessage(SendPort sp, List m); 187 external bool sendIsolateServiceMessage(SendPort sp, List m);
185 external void sendRootServiceMessage(List m); 188 external void sendRootServiceMessage(List m);
186 external void sendObjectRootServiceMessage(List m); 189 external void sendObjectRootServiceMessage(List m);
OLDNEW
« no previous file with comments | « sdk/lib/vmservice/devfs.dart ('k') | sdk/lib/vmservice/vmservice.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698