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

Unified Diff: sdk/lib/io/list_stream_impl.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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 | « sdk/lib/io/http_session.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/list_stream_impl.dart
diff --git a/sdk/lib/io/list_stream_impl.dart b/sdk/lib/io/list_stream_impl.dart
index 9d279c0b386028feaf90f6426431042ccc5e9925..e5933848d10113b1028da58ce985c81935fe401c 100644
--- a/sdk/lib/io/list_stream_impl.dart
+++ b/sdk/lib/io/list_stream_impl.dart
@@ -99,7 +99,7 @@ class _ListOutputStream extends _BaseOutputStream implements ListOutputStream {
}
void _checkScheduleCallbacks() {
- void issueDataCallback(Timer timer) {
+ void issueDataCallback() {
_scheduledDataCallback = null;
if (_clientDataHandler != null) {
_clientDataHandler();
@@ -107,7 +107,7 @@ class _ListOutputStream extends _BaseOutputStream implements ListOutputStream {
}
}
- void issueNoPendingWriteCallback(Timer timer) {
+ void issueNoPendingWriteCallback() {
_scheduledNoPendingWriteCallback = null;
if (_clientNoPendingWriteHandler != null &&
!_streamMarkedClosed) {
@@ -116,7 +116,7 @@ class _ListOutputStream extends _BaseOutputStream implements ListOutputStream {
}
}
- void issueCloseCallback(Timer timer) {
+ void issueCloseCallback() {
_scheduledCloseCallback = null;
if (_clientCloseHandler != null) _clientCloseHandler();
}
@@ -131,18 +131,18 @@ class _ListOutputStream extends _BaseOutputStream implements ListOutputStream {
if (!_bufferList.isEmpty &&
_clientDataHandler != null &&
_scheduledDataCallback == null) {
- _scheduledDataCallback = new Timer(0, issueDataCallback);
+ _scheduledDataCallback = Timer.run(issueDataCallback);
}
if (_clientNoPendingWriteHandler != null &&
_scheduledNoPendingWriteCallback == null &&
_scheduledDataCallback == null) {
_scheduledNoPendingWriteCallback =
- new Timer(0, issueNoPendingWriteCallback);
+ Timer.run(issueNoPendingWriteCallback);
}
} else if (_clientCloseHandler != null) {
- _scheduledCloseCallback = new Timer(0, issueCloseCallback);
+ _scheduledCloseCallback = Timer.run(issueCloseCallback);
_closeCallbackCalled = true;
}
}
« no previous file with comments | « sdk/lib/io/http_session.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698