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

Side by Side 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, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/deployed/web/index.html » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 5
6 final Map _servicePathMap = { 6 final Map _servicePathMap = {
7 'http' : { 7 'http' : {
8 'servers' : _httpServersServiceObject 8 'servers' : _httpServersServiceObject
9 },
10 'file' : {
11 'randomaccessfiles' : _randomAccessFilesServiceObject
9 } 12 }
10 }; 13 };
11 14
12 String _serviceObjectHandler(List<String> paths, 15 String _serviceObjectHandler(List<String> paths,
13 List<String> keys, 16 List<String> keys,
14 List<String> values) { 17 List<String> values) {
15 assert(keys.length == values.length); 18 assert(keys.length == values.length);
16 badPath() { 19 badPath() {
17 throw "Invalid path '${paths.join("/")}'"; 20 throw "Invalid path '${paths.join("/")}'";
18 } 21 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 55 }
53 return server._toJSON(false); 56 return server._toJSON(false);
54 } 57 }
55 return { 58 return {
56 'id': 'io/http/servers', 59 'id': 'io/http/servers',
57 'type': 'HttpServerList', 60 'type': 'HttpServerList',
58 'members': _HttpServer._servers.values 61 'members': _HttpServer._servers.values
59 .map((server) => server._toJSON(true)).toList(), 62 .map((server) => server._toJSON(true)).toList(),
60 }; 63 };
61 } 64 }
65
66 Map _randomAccessFilesServiceObject(args) {
67 if (args.length == 1) {
68 var raf = _RandomAccessFile._files[int.parse(args.first)];
69 if (raf == null) {
70 return {};
71 }
72 return raf._toJSON(false);
73 }
74 return {
75 'id': 'io/file/randomaccessfiles',
76 'type': 'RandomAccessFileList',
77 'members': _RandomAccessFile._files.values
78 .map((raf) => raf._toJSON(true)).toList(),
79 };
80 }
81
OLDNEW
« 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