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

Unified Diff: runtime/bin/service_object_patch.dart

Issue 286903010: Add dart:io view to the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing files. Created 6 years, 7 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 | runtime/bin/vmservice/client/deployed/web/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/service_object_patch.dart
diff --git a/runtime/bin/service_object_patch.dart b/runtime/bin/service_object_patch.dart
index f23dd71b472627838b9014dd27fcc7c7e45375a8..b67059820f398fabefd22bb2aa9ce12a39d8d409 100644
--- a/runtime/bin/service_object_patch.dart
+++ b/runtime/bin/service_object_patch.dart
@@ -17,7 +17,7 @@ String _serviceObjectHandler(List<String> paths,
throw "Invalid path '${paths.join("/")}'";
}
if (paths.isEmpty) {
- badPath();
+ return JSON.encode(_ioServiceObject());
}
int i = 0;
var current = _servicePathMap;
@@ -35,6 +35,15 @@ String _serviceObjectHandler(List<String> paths,
return JSON.encode(current(paths.sublist(i)));
}
+Map _ioServiceObject() {
+ return {
+ 'id': 'io',
+ 'type': 'IO',
+ 'name': 'io',
+ 'user_name': 'io',
+ };
+}
+
Map _httpServersServiceObject(args) {
if (args.length == 1) {
var server = _HttpServer._servers[int.parse(args.first)];
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/deployed/web/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698