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

Side by Side Diff: runtime/bin/service_object_patch.dart

Issue 307503002: Add processes 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | 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 }, 9 },
10 'sockets' : _socketsServiceObject, 10 'sockets' : _socketsServiceObject,
11 'file' : { 11 'file' : {
12 'randomaccessfiles' : _randomAccessFilesServiceObject 12 'randomaccessfiles' : _randomAccessFilesServiceObject
13 } 13 },
14 'processes' : _processesServiceObject,
14 }; 15 };
15 16
16 String _serviceObjectHandler(List<String> paths, 17 String _serviceObjectHandler(List<String> paths,
17 List<String> keys, 18 List<String> keys,
18 List<String> values) { 19 List<String> values) {
19 assert(keys.length == values.length); 20 assert(keys.length == values.length);
20 badPath() { 21 badPath() {
21 throw "Invalid path '${paths.join("/")}'"; 22 throw "Invalid path '${paths.join("/")}'";
22 } 23 }
23 if (paths.isEmpty) { 24 if (paths.isEmpty) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return raf._toJSON(false); 90 return raf._toJSON(false);
90 } 91 }
91 return { 92 return {
92 'id': 'io/file/randomaccessfiles', 93 'id': 'io/file/randomaccessfiles',
93 'type': 'RandomAccessFileList', 94 'type': 'RandomAccessFileList',
94 'members': _RandomAccessFile._files.values 95 'members': _RandomAccessFile._files.values
95 .map((raf) => raf._toJSON(true)).toList(), 96 .map((raf) => raf._toJSON(true)).toList(),
96 }; 97 };
97 } 98 }
98 99
100 Map _processesServiceObject(args) {
101 if (args.length == 1) {
102 var process = _ProcessImpl._processes[int.parse(args.first)];
103 if (process == null) {
104 return {};
105 }
106 return process._toJSON(false);
107 }
108 return {
109 'id': 'io/processes',
110 'type': 'ProcessList',
111 'members': _ProcessImpl._processes.values
112 .map((p) => p._toJSON(true)).toList(),
113 };
114 }
OLDNEW
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | runtime/bin/vmservice/client/deployed/web/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698