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

Side by Side Diff: sdk/lib/vmservice/asset.dart

Issue 2974433002: Remaining private libs (Closed)
Patch Set: It's html_common Created 3 years, 5 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
« no previous file with comments | « sdk/lib/math/rectangle.dart ('k') | sdk/lib/vmservice/client.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 "vmservice.dart"; 5 part of "dart:_vmservice";
6 6
7 class Asset { 7 class Asset {
8 final String name; 8 final String name;
9 final Uint8List data; 9 final Uint8List data;
10 10
11 Asset(this.name, this.data); 11 Asset(this.name, this.data);
12 12
13 String get mimeType { 13 String get mimeType {
14 var extensionStart = name.lastIndexOf('.'); 14 var extensionStart = name.lastIndexOf('.');
15 var extension = name.substring(extensionStart + 1); 15 var extension = name.substring(extensionStart + 1);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 int type = _readType(_bs); 201 int type = _readType(_bs);
202 _bs.seekToNextBlock(tarHeaderSize); 202 _bs.seekToNextBlock(tarHeaderSize);
203 if (type != tarHeaderFileType) { 203 if (type != tarHeaderFileType) {
204 _skipContents(_bs, size); 204 _skipContents(_bs, size);
205 return null; 205 return null;
206 } 206 }
207 Uint8List bytes = _readContents(_bs, size); 207 Uint8List bytes = _readContents(_bs, size);
208 return new Asset(filename, bytes); 208 return new Asset(filename, bytes);
209 } 209 }
210 } 210 }
OLDNEW
« no previous file with comments | « sdk/lib/math/rectangle.dart ('k') | sdk/lib/vmservice/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698