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

Side by Side Diff: sdk/lib/io/http_impl.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 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 | « sdk/lib/io/http_headers.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart.io; 5 part of dart.io;
6 6
7 class _HttpIncoming extends Stream<List<int>> { 7 class _HttpIncoming extends Stream<List<int>> {
8 final int _transferLength; 8 final int _transferLength;
9 final Completer _dataCompleter = new Completer(); 9 final Completer _dataCompleter = new Completer();
10 Stream<List<int>> _stream; 10 Stream<List<int>> _stream;
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 } 944 }
945 945
946 static List<int> _chunkHeader(int length) { 946 static List<int> _chunkHeader(int length) {
947 const hexDigits = const [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 947 const hexDigits = const [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
948 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46]; 948 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46];
949 var header = []; 949 var header = [];
950 if (length == 0) { 950 if (length == 0) {
951 header.add(hexDigits[length]); 951 header.add(hexDigits[length]);
952 } else { 952 } else {
953 while (length > 0) { 953 while (length > 0) {
954 header.insertRange(0, 1, hexDigits[length % 16]); 954 header.insert(0, hexDigits[length % 16]);
955 length = length >> 4; 955 length = length >> 4;
956 } 956 }
957 } 957 }
958 header.add(_CharCode.CR); 958 header.add(_CharCode.CR);
959 header.add(_CharCode.LF); 959 header.add(_CharCode.LF);
960 return header; 960 return header;
961 } 961 }
962 962
963 // Footer is just a CRLF. 963 // Footer is just a CRLF.
964 static List<int> get _chunkFooter => const [_CharCode.CR, _CharCode.LF]; 964 static List<int> get _chunkFooter => const [_CharCode.CR, _CharCode.LF];
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 1986
1987 1987
1988 class _RedirectInfo implements RedirectInfo { 1988 class _RedirectInfo implements RedirectInfo {
1989 const _RedirectInfo(int this.statusCode, 1989 const _RedirectInfo(int this.statusCode,
1990 String this.method, 1990 String this.method,
1991 Uri this.location); 1991 Uri this.location);
1992 final int statusCode; 1992 final int statusCode;
1993 final String method; 1993 final String method;
1994 final Uri location; 1994 final Uri location;
1995 } 1995 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698