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

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

Issue 11617004: Fix analyzer errors and warnings for pkg/http. (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 | « pkg/http/lib/src/client.dart ('k') | pkg/http/test/utils.dart » ('j') | 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 3570541f653c114ef039d17569a70be98a46eb71..dd538c52ed7211c64fb069cf781da952c2dff603 100644
--- a/pkg/http/lib/src/streamed_request.dart
+++ b/pkg/http/lib/src/streamed_request.dart
@@ -23,7 +23,10 @@ class StreamedRequest extends BaseRequest {
/// buffered.
///
/// Closing this signals the end of the request.
- final OutputStream stream;
+ OutputStream get stream => _outputStream;
+
+ /// [stream], stored as a [ListOutputStream].
+ final ListOutputStream _outputStream;
Bob Nystrom 2012/12/17 23:55:15 Why did you have to make this change?
nweiz 2012/12/18 00:25:32 Because onData and read() (referred to in the cons
Bob Nystrom 2012/12/18 00:26:25 If those are only in the ctor, how about just maki
nweiz 2012/12/18 19:21:52 I'll do that in a separate CL.
/// The stream from which the [BaseClient] will read the data in [stream] once
/// the request has been finalized.
@@ -32,12 +35,12 @@ class StreamedRequest extends BaseRequest {
/// Creates a new streaming request.
StreamedRequest(String method, Uri url)
: super(method, url),
- stream = new ListOutputStream(),
+ _outputStream = new ListOutputStream(),
_inputStream = new ListInputStream() {
// TODO(nweiz): pipe errors from the output stream to the input stream once
// issue 3657 is fixed
- stream.onData = () => _inputStream.write(stream.read());
- stream.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 | « pkg/http/lib/src/client.dart ('k') | pkg/http/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698