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

Unified Diff: runtime/observatory/lib/service_common.dart

Issue 897193002: Finish moving service protocol to json rpc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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 | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/application.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/service_common.dart
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index c082fdf6de1836e4b890616ed8d032781c04a1e4..f417b88d8adc548f5970db4470d20b8b2f35f847 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -58,10 +58,7 @@ class _WebSocketRequest {
final Map params;
final Completer<String> completer;
- _WebSocketRequest.old(this.method)
- : params = null, completer = new Completer<String>();
-
- _WebSocketRequest.rpc(this.method, this.params)
+ _WebSocketRequest(this.method, this.params)
: completer = new Completer<String>();
}
@@ -128,31 +125,6 @@ abstract class CommonWebSocketVM extends VM {
_notifyDisconnect();
}
- Future<String> getStringDeprecated(String id) {
- if (!_hasInitiatedConnect) {
- _hasInitiatedConnect = true;
- _webSocket.connect(
- target.networkAddress, _onOpen, _onMessage, _onError, _onClose);
- }
- return _makeRequest(id);
- }
-
- /// Add a request for [id] to pending requests.
- Future<String> _makeRequest(String id) {
- assert(_hasInitiatedConnect);
- // Create request.
- String serial = (_requestSerial++).toString();
- var request = new _WebSocketRequest.old(id);
- if (_webSocket.isOpen) {
- // Already connected, send request immediately.
- _sendRequest(serial, request);
- } else {
- // Not connected yet, add to delayed requests.
- _delayedRequests[serial] = request;
- }
- return request.completer.future;
- }
-
Future<String> invokeRpcRaw(String method, Map params) {
if (!_hasInitiatedConnect) {
_hasInitiatedConnect = true;
@@ -160,7 +132,7 @@ abstract class CommonWebSocketVM extends VM {
target.networkAddress, _onOpen, _onMessage, _onError, _onClose);
}
String serial = (_requestSerial++).toString();
- var request = new _WebSocketRequest.rpc(method, params);
+ var request = new _WebSocketRequest(method, params);
if (_webSocket.isOpen) {
// Already connected, send request immediately.
_sendRequest(serial, request);
@@ -289,7 +261,9 @@ abstract class CommonWebSocketVM extends VM {
/// Send the request over WebSocket.
void _sendRequest(String serial, _WebSocketRequest request) {
assert (_webSocket.isOpen);
- if (request.method != 'getTagProfile') {
+ if (request.method != 'getTagProfile' &&
+ request.method != 'getIsolateMetric' &&
+ request.method != 'getVMMetric') {
Logger.root.info('GET ${request.method} from ${target.networkAddress}');
}
// Mark request as pending.
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/application.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698