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

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

Issue 1374113006: Use the new Base64 support from dart:convert in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/observatory_sources.gypi » ('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 /// Helper function for canceling a Future<StreamSubscription>. 7 /// Helper function for canceling a Future<StreamSubscription>.
8 Future cancelFutureSubscription( 8 Future cancelFutureSubscription(
9 Future<StreamSubscription> subscriptionFuture) async { 9 Future<StreamSubscription> subscriptionFuture) async {
10 if (subscriptionFuture != null) { 10 if (subscriptionFuture != null) {
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 nodeCount = map['nodeCount']; 1964 nodeCount = map['nodeCount'];
1965 } 1965 }
1966 if (map['count'] != null) { 1966 if (map['count'] != null) {
1967 count = map['count']; 1967 count = map['count'];
1968 } 1968 }
1969 if (map['_debuggerSettings'] != null && 1969 if (map['_debuggerSettings'] != null &&
1970 map['_debuggerSettings']['_exceptions'] != null) { 1970 map['_debuggerSettings']['_exceptions'] != null) {
1971 exceptions = map['_debuggerSettings']['_exceptions']; 1971 exceptions = map['_debuggerSettings']['_exceptions'];
1972 } 1972 }
1973 if (map['bytes'] != null) { 1973 if (map['bytes'] != null) {
1974 var bytes = decodeBase64(map['bytes']); 1974 var bytes = BASE64.decode(map['bytes']);
1975 bytesAsString = UTF8.decode(bytes); 1975 bytesAsString = UTF8.decode(bytes);
1976 } 1976 }
1977 if (map['logRecord'] != null) { 1977 if (map['logRecord'] != null) {
1978 logRecord = map['logRecord']; 1978 logRecord = map['logRecord'];
1979 logRecord['time'] = 1979 logRecord['time'] =
1980 new DateTime.fromMillisecondsSinceEpoch(logRecord['time']); 1980 new DateTime.fromMillisecondsSinceEpoch(logRecord['time']);
1981 logRecord['level'] = _findLogLevel(logRecord['level']); 1981 logRecord['level'] = _findLogLevel(logRecord['level']);
1982 } 1982 }
1983 } 1983 }
1984 1984
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 oneByteFunction = map['_oneByteFunction']; 2406 oneByteFunction = map['_oneByteFunction'];
2407 twoByteFunction = map['_twoByteFunction']; 2407 twoByteFunction = map['_twoByteFunction'];
2408 externalOneByteFunction = map['_externalOneByteFunction']; 2408 externalOneByteFunction = map['_externalOneByteFunction'];
2409 externalTwoByteFunction = map['_externalTwoByteFunction']; 2409 externalTwoByteFunction = map['_externalTwoByteFunction'];
2410 2410
2411 nativeFields = map['_nativeFields']; 2411 nativeFields = map['_nativeFields'];
2412 fields = map['fields']; 2412 fields = map['fields'];
2413 elements = map['elements']; 2413 elements = map['elements'];
2414 associations = map['associations']; 2414 associations = map['associations'];
2415 if (map['bytes'] != null) { 2415 if (map['bytes'] != null) {
2416 var bytes = decodeBase64(map['bytes']); 2416 var bytes = BASE64.decode(map['bytes']);
2417 switch (map['kind']) { 2417 switch (map['kind']) {
2418 case "Uint8ClampedList": 2418 case "Uint8ClampedList":
2419 typedElements = bytes.buffer.asUint8ClampedList(); break; 2419 typedElements = bytes.buffer.asUint8ClampedList(); break;
2420 case "Uint8List": 2420 case "Uint8List":
2421 typedElements = bytes.buffer.asUint8List(); break; 2421 typedElements = bytes.buffer.asUint8List(); break;
2422 case "Uint16List": 2422 case "Uint16List":
2423 typedElements = bytes.buffer.asUint16List(); break; 2423 typedElements = bytes.buffer.asUint16List(); break;
2424 case "Uint32List": 2424 case "Uint32List":
2425 typedElements = bytes.buffer.asUint32List(); break; 2425 typedElements = bytes.buffer.asUint32List(); break;
2426 case "Uint64List": 2426 case "Uint64List":
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4022 var v = list[i]; 4022 var v = list[i];
4023 if ((v is ObservableMap) && _isServiceMap(v)) { 4023 if ((v is ObservableMap) && _isServiceMap(v)) {
4024 list[i] = owner.getFromMap(v); 4024 list[i] = owner.getFromMap(v);
4025 } else if (v is ObservableList) { 4025 } else if (v is ObservableList) {
4026 _upgradeObservableList(v, owner); 4026 _upgradeObservableList(v, owner);
4027 } else if (v is ObservableMap) { 4027 } else if (v is ObservableMap) {
4028 _upgradeObservableMap(v, owner); 4028 _upgradeObservableMap(v, owner);
4029 } 4029 }
4030 } 4030 }
4031 } 4031 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698