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

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

Issue 46663003: Fix sdk/lib/io errors found by the analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/io_sink.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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 void writeCharCode(int charCode) { 454 void writeCharCode(int charCode) {
455 _dataSink.writeCharCode(charCode); 455 _dataSink.writeCharCode(charCode);
456 } 456 }
457 457
458 void add(List<int> data) { 458 void add(List<int> data) {
459 if (data.length == 0) return; 459 if (data.length == 0) return;
460 _dataSink.add(data); 460 _dataSink.add(data);
461 } 461 }
462 462
463 void addError(error) { 463 void addError(error, [StackTrace stackTrace]) {
464 _dataSink.addError(error); 464 _dataSink.addError(error, stackTrace);
465 } 465 }
466 466
467 Future<T> addStream(Stream<List<int>> stream) { 467 Future<T> addStream(Stream<List<int>> stream) {
468 return _dataSink.addStream(stream); 468 return _dataSink.addStream(stream);
469 } 469 }
470 470
471 Future close() { 471 Future close() {
472 return _dataSink.close(); 472 return _dataSink.close();
473 } 473 }
474 474
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 void writeln([Object obj = ""]) => _socket.writeln(obj); 2237 void writeln([Object obj = ""]) => _socket.writeln(obj);
2238 2238
2239 void writeCharCode(int charCode) => _socket.writeCharCode(charCode); 2239 void writeCharCode(int charCode) => _socket.writeCharCode(charCode);
2240 2240
2241 void writeAll(Iterable objects, [String separator = ""]) { 2241 void writeAll(Iterable objects, [String separator = ""]) {
2242 _socket.writeAll(objects, separator); 2242 _socket.writeAll(objects, separator);
2243 } 2243 }
2244 2244
2245 void add(List<int> bytes) => _socket.add(bytes); 2245 void add(List<int> bytes) => _socket.add(bytes);
2246 2246
2247 void addError(error) => _socket.addError(error); 2247 void addError(error, [StackTrace stackTrace]) =>
2248 _socket.addError(error, stackTrace);
2248 2249
2249 Future<Socket> addStream(Stream<List<int>> stream) { 2250 Future<Socket> addStream(Stream<List<int>> stream) {
2250 return _socket.addStream(stream); 2251 return _socket.addStream(stream);
2251 } 2252 }
2252 2253
2253 void destroy() => _socket.destroy(); 2254 void destroy() => _socket.destroy();
2254 2255
2255 Future close() => _socket.close(); 2256 Future close() => _socket.close();
2256 2257
2257 Future<Socket> get done => _socket.done; 2258 Future<Socket> get done => _socket.done;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 final Uri location; 2512 final Uri location;
2512 } 2513 }
2513 2514
2514 String _getHttpVersion() { 2515 String _getHttpVersion() {
2515 var version = Platform.version; 2516 var version = Platform.version;
2516 // Only include major and minor version numbers. 2517 // Only include major and minor version numbers.
2517 int index = version.indexOf('.', version.indexOf('.') + 1); 2518 int index = version.indexOf('.', version.indexOf('.') + 1);
2518 version = version.substring(0, index); 2519 version = version.substring(0, index);
2519 return 'Dart/$version (dart:io)'; 2520 return 'Dart/$version (dart:io)';
2520 } 2521 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/io_sink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698