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

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

Issue 13866006: Implement consumer, not pipe, in _HttpClientRequest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Future<HttpClientResponse> get response { 727 Future<HttpClientResponse> get response {
728 if (_response == null) { 728 if (_response == null) {
729 _response = Future.wait([_responseCompleter.future, super.done]) 729 _response = Future.wait([_responseCompleter.future, super.done])
730 .then((list) => list[0]); 730 .then((list) => list[0]);
731 } 731 }
732 return _response; 732 return _response;
733 } 733 }
734 734
735 Future<HttpClientResponse> get done => response; 735 Future<HttpClientResponse> get done => response;
736 736
737 Future<HttpClientResponse> pipe(Stream<List<int>> stream) { 737 Future<HttpClientResponse> consume(Stream<List<int>> stream) {
738 super.pipe(stream); 738 super.consume(stream);
739 return response; 739 return response;
740 } 740 }
741 741
742 Future<HttpClientResponse> close() { 742 Future<HttpClientResponse> close() {
743 super.close(); 743 super.close();
744 return response; 744 return response;
745 } 745 }
746 746
747 int get maxRedirects => _maxRedirects; 747 int get maxRedirects => _maxRedirects;
748 void set maxRedirects(int maxRedirects) { 748 void set maxRedirects(int maxRedirects) {
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 1820
1821 1821
1822 class _RedirectInfo implements RedirectInfo { 1822 class _RedirectInfo implements RedirectInfo {
1823 const _RedirectInfo(int this.statusCode, 1823 const _RedirectInfo(int this.statusCode,
1824 String this.method, 1824 String this.method,
1825 Uri this.location); 1825 Uri this.location);
1826 final int statusCode; 1826 final int statusCode;
1827 final String method; 1827 final String method;
1828 final Uri location; 1828 final Uri location;
1829 } 1829 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698