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

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

Issue 14172013: Remove second generic argument of StreamConsumer. (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 | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 "Content size below specified contentLength. " 905 "Content size below specified contentLength. "
906 " $_bytesWritten bytes written while expected " 906 " $_bytesWritten bytes written while expected "
907 "$expectedContentLength."))); 907 "$expectedContentLength.")));
908 } 908 }
909 sink.close(); 909 sink.close();
910 } 910 }
911 } 911 }
912 912
913 913
914 // Extends StreamConsumer as this is an internal type, only used to pipe to. 914 // Extends StreamConsumer as this is an internal type, only used to pipe to.
915 class _HttpOutgoing implements StreamConsumer<List<int>, dynamic> { 915 class _HttpOutgoing implements StreamConsumer<List<int>> {
916 Function _onStream; 916 Function _onStream;
917 final Completer _consumeCompleter = new Completer(); 917 final Completer _consumeCompleter = new Completer();
918 918
919 Future onStream(Future callback(Stream<List<int>> stream)) { 919 Future onStream(Future callback(Stream<List<int>> stream)) {
920 _onStream = callback; 920 _onStream = callback;
921 return _consumeCompleter.future; 921 return _consumeCompleter.future;
922 } 922 }
923 923
924 Future consume(Stream<List<int>> stream) { 924 Future consume(Stream<List<int>> stream) {
925 _onStream(stream) 925 _onStream(stream)
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 1825
1826 1826
1827 class _RedirectInfo implements RedirectInfo { 1827 class _RedirectInfo implements RedirectInfo {
1828 const _RedirectInfo(int this.statusCode, 1828 const _RedirectInfo(int this.statusCode,
1829 String this.method, 1829 String this.method,
1830 Uri this.location); 1830 Uri this.location);
1831 final int statusCode; 1831 final int statusCode;
1832 final String method; 1832 final String method;
1833 final Uri location; 1833 final Uri location;
1834 } 1834 }
OLDNEW
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698