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

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

Issue 311153003: Add Observatory test of io. (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/socket_patch.dart » ('j') | tests/standalone/io/observatory.dart » ('J')
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 'websockets' : _webSocketsServiceObject, 11 'websockets' : _webSocketsServiceObject,
12 'file' : { 12 'file' : {
13 'randomaccessfiles' : _randomAccessFilesServiceObject 13 'randomaccessfiles' : _randomAccessFilesServiceObject
14 }, 14 },
15 'processes' : _processesServiceObject, 15 'processes' : _processesServiceObject,
16 }; 16 };
17 17
18 String _getServicePath(obj) => obj._servicePath;
19
18 String _serviceObjectHandler(List<String> paths, 20 String _serviceObjectHandler(List<String> paths,
19 List<String> keys, 21 List<String> keys,
20 List<String> values) { 22 List<String> values) {
21 assert(keys.length == values.length); 23 assert(keys.length == values.length);
22 if (paths.isEmpty) { 24 if (paths.isEmpty) {
23 return JSON.encode(_ioServiceObject()); 25 return JSON.encode(_ioServiceObject());
24 } 26 }
25 int i = 0; 27 int i = 0;
26 var current = _servicePathMap; 28 var current = _servicePathMap;
27 do { 29 do {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 143 }
142 return process._toJSON(false); 144 return process._toJSON(false);
143 } 145 }
144 return { 146 return {
145 'id': 'io/processes', 147 'id': 'io/processes',
146 'type': 'ProcessList', 148 'type': 'ProcessList',
147 'members': _ProcessImpl._processes.values 149 'members': _ProcessImpl._processes.values
148 .map((p) => p._toJSON(true)).toList(), 150 .map((p) => p._toJSON(true)).toList(),
149 }; 151 };
150 } 152 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/socket_patch.dart » ('j') | tests/standalone/io/observatory.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698