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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 1132323002: Add Service ID zones to service protocol (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | runtime/vm/dart.cc » ('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 part of service; 5 part of service;
6 6
7 /// A [ServiceObject] represents a persistent object within the vm. 7 /// A [ServiceObject] represents a persistent object within the vm.
8 abstract class ServiceObject extends Observable { 8 abstract class ServiceObject extends Observable {
9 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { 9 static int LexicalSortName(ServiceObject o1, ServiceObject o2) {
10 return o1.name.compareTo(o2.name); 10 return o1.name.compareTo(o2.name);
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 String _canonicalizeUri(Uri uri) { 583 String _canonicalizeUri(Uri uri) {
584 // We use the uri as the key to the response map. Uri parameters can be 584 // We use the uri as the key to the response map. Uri parameters can be
585 // serialized in any order, this function canonicalizes the uri parameters 585 // serialized in any order, this function canonicalizes the uri parameters
586 // so they are serialized in sorted-by-parameter-name order. 586 // so they are serialized in sorted-by-parameter-name order.
587 var method = uri.path; 587 var method = uri.path;
588 // Create a map sorted on insertion order. 588 // Create a map sorted on insertion order.
589 var parameters = new Map(); 589 var parameters = new Map();
590 // Sort keys. 590 // Sort keys.
591 var sortedKeys = uri.queryParameters.keys.toList(); 591 var sortedKeys = uri.queryParameters.keys.toList();
592 sortedKeys.sort(); 592 sortedKeys.sort();
593 // Filter keys. 593 // Filter keys to remove any private options.
594 if (method == 'getStack') { 594 sortedKeys.removeWhere((k) => k.startsWith('_'));
595 // Remove the 'full' parameter.
596 sortedKeys.remove('full');
597 }
598 // Insert parameters in sorted order. 595 // Insert parameters in sorted order.
599 for (var key in sortedKeys) { 596 for (var key in sortedKeys) {
600 parameters[key] = uri.queryParameters[key]; 597 parameters[key] = uri.queryParameters[key];
601 } 598 }
602 // Return canonical uri. 599 // Return canonical uri.
603 return new Uri(path: method, queryParameters: parameters).toString(); 600 return new Uri(path: method, queryParameters: parameters).toString();
604 } 601 }
605 602
606 /// Force the VM to disconnect. 603 /// Force the VM to disconnect.
607 void disconnect() { 604 void disconnect() {
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
3136 var v = list[i]; 3133 var v = list[i];
3137 if ((v is ObservableMap) && _isServiceMap(v)) { 3134 if ((v is ObservableMap) && _isServiceMap(v)) {
3138 list[i] = owner.getFromMap(v); 3135 list[i] = owner.getFromMap(v);
3139 } else if (v is ObservableList) { 3136 } else if (v is ObservableList) {
3140 _upgradeObservableList(v, owner); 3137 _upgradeObservableList(v, owner);
3141 } else if (v is ObservableMap) { 3138 } else if (v is ObservableMap) {
3142 _upgradeObservableMap(v, owner); 3139 _upgradeObservableMap(v, owner);
3143 } 3140 }
3144 } 3141 }
3145 } 3142 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698