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

Unified Diff: runtime/bin/chunked_stream.dart

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/tests/frog/src/FrogServerTest.dart ('k') | runtime/bin/directory.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/chunked_stream.dart
diff --git a/runtime/bin/chunked_stream.dart b/runtime/bin/chunked_stream.dart
index d2c66cd3e2cbf130e8d6fd7b215cadb1060ab794..04f0915f2f41f4b97041547bfed2a11ccf3601b0 100644
--- a/runtime/bin/chunked_stream.dart
+++ b/runtime/bin/chunked_stream.dart
@@ -8,7 +8,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
if (_chunkSize === null) {
_chunkSize = 0;
}
- _input.closeHandler = _closeHandler;
+ _input.onClosed = _onClosed;
}
List<int> read() {
@@ -39,20 +39,20 @@ class _ChunkedInputStream implements ChunkedInputStream {
bool get closed() => _closed;
- void set dataHandler(void callback()) {
+ void set onData(void callback()) {
_clientDataHandler = callback;
_checkInstallDataHandler();
}
- void set closeHandler(void callback()) {
+ void set onClosed(void callback()) {
_clientCloseHandler = callback;
}
- void set errorHandler(void callback()) {
- _input.errorHandler = callback;
+ void set onError(void callback()) {
+ _input.onError = callback;
}
- void _dataHandler() {
+ void _onData() {
_readData();
if (_bufferList.length >= _chunkSize && _clientDataHandler !== null) {
_clientDataHandler();
@@ -68,7 +68,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
}
}
- void _closeHandler() {
+ void _onClosed() {
_inputClosed = true;
if (_bufferList.length == 0 && _clientCloseHandler !== null) {
_clientCloseHandler();
@@ -80,12 +80,12 @@ class _ChunkedInputStream implements ChunkedInputStream {
void _checkInstallDataHandler() {
if (_clientDataHandler === null) {
- _input.dataHandler = null;
+ _input.onData = null;
} else {
if (_bufferList.length < _chunkSize && !_inputClosed) {
- _input.dataHandler = _dataHandler;
+ _input.onData = _onData;
} else {
- _input.dataHandler = null;
+ _input.onData = null;
}
}
}
« no previous file with comments | « frog/tests/frog/src/FrogServerTest.dart ('k') | runtime/bin/directory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698