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

Unified Diff: runtime/bin/service_object_patch.dart

Issue 291343009: Add initial Random Access File information to Observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 b67059820f398fabefd22bb2aa9ce12a39d8d409..2a0669419a4a9c5260015cf3f9b701278f3821d7 100644
--- a/runtime/bin/service_object_patch.dart
+++ b/runtime/bin/service_object_patch.dart
@@ -6,6 +6,9 @@
final Map _servicePathMap = {
'http' : {
'servers' : _httpServersServiceObject
+ },
+ 'file' : {
+ 'randomaccessfiles' : _randomAccessFilesServiceObject
}
};
@@ -59,3 +62,20 @@ Map _httpServersServiceObject(args) {
.map((server) => server._toJSON(true)).toList(),
};
}
+
+Map _randomAccessFilesServiceObject(args) {
+ if (args.length == 1) {
+ var raf = _RandomAccessFile._files[int.parse(args.first)];
+ if (raf == null) {
+ return {};
+ }
+ return raf._toJSON(false);
+ }
+ return {
+ 'id': 'io/file/randomaccessfiles',
+ 'type': 'RandomAccessFileList',
+ 'members': _RandomAccessFile._files.values
+ .map((raf) => raf._toJSON(true)).toList(),
+ };
+}
+
« 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