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

Unified Diff: pkg/http/lib/src/streamed_request.dart

Issue 11647010: Code review change for r16238. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/streamed_request.dart
diff --git a/pkg/http/lib/src/streamed_request.dart b/pkg/http/lib/src/streamed_request.dart
index dd538c52ed7211c64fb069cf781da952c2dff603..fac5151f355b9e4a5a61c02c2dbadd8f893c39ba 100644
--- a/pkg/http/lib/src/streamed_request.dart
+++ b/pkg/http/lib/src/streamed_request.dart
@@ -23,10 +23,7 @@ class StreamedRequest extends BaseRequest {
/// buffered.
///
/// Closing this signals the end of the request.
- OutputStream get stream => _outputStream;
-
- /// [stream], stored as a [ListOutputStream].
- final ListOutputStream _outputStream;
+ final OutputStream stream;
/// The stream from which the [BaseClient] will read the data in [stream] once
/// the request has been finalized.
@@ -35,12 +32,13 @@ class StreamedRequest extends BaseRequest {
/// Creates a new streaming request.
StreamedRequest(String method, Uri url)
: super(method, url),
- _outputStream = new ListOutputStream(),
+ stream = new ListOutputStream(),
_inputStream = new ListInputStream() {
+ ListOutputStream outputStream = stream;
// TODO(nweiz): pipe errors from the output stream to the input stream once
// issue 3657 is fixed
- _outputStream.onData = () => _inputStream.write(_outputStream.read());
- _outputStream.onClosed = _inputStream.markEndOfStream;
+ outputStream.onData = () => _inputStream.write(outputStream.read());
+ outputStream.onClosed = _inputStream.markEndOfStream;
}
/// Freezes all mutable fields other than [stream] and returns an [InputStream]
« 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