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

Unified Diff: runtime/bin/http_impl.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 | « runtime/bin/file.dart ('k') | runtime/bin/list_stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index eae752a86834d44d074125e3934cc13af7cde8d7..f90339d6565176278612ba8f4200669920ed90b9 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -2038,7 +2038,7 @@ class _ProxyConfiguration {
List<String> list = configuration.split(";");
list.forEach((String proxy) {
proxy = proxy.trim();
- if (!proxy.isEmpty()) {
+ if (!proxy.isEmpty) {
if (proxy.startsWith(PROXY_PREFIX)) {
int colon = proxy.indexOf(":");
if (colon == -1 || colon == 0 || colon == proxy.length - 1) {
@@ -2100,7 +2100,7 @@ class _HttpClient implements HttpClient {
Uri uri,
[_HttpClientConnection connection]) {
if (_shutdown) throw new HttpException("HttpClient shutdown");
- if (method == null || uri.domain.isEmpty()) {
+ if (method == null || uri.domain.isEmpty) {
throw new ArgumentError(null);
}
return _prepareHttpClientConnection(method, uri, connection);
@@ -2138,7 +2138,7 @@ class _HttpClient implements HttpClient {
void shutdown() {
_openSockets.forEach((String key, Queue<_SocketConnection> connections) {
- while (!connections.isEmpty()) {
+ while (!connections.isEmpty) {
_SocketConnection socketConn = connections.removeFirst();
socketConn._socket.close();
}
@@ -2202,7 +2202,7 @@ class _HttpClient implements HttpClient {
// otherwise create a new one.
String key = _connectionKey(connectHost, connectPort);
Queue socketConnections = _openSockets[key];
- if (socketConnections == null || socketConnections.isEmpty()) {
+ if (socketConnections == null || socketConnections.isEmpty) {
Socket socket = new Socket(connectHost, connectPort);
// Until the connection is established handle connection errors
// here as the HttpClientConnection object is not yet associated
@@ -2236,8 +2236,8 @@ class _HttpClient implements HttpClient {
_connectionOpened(socketConn, connection, !proxy.isDirect));
// Get rid of eviction timer if there are no more active connections.
- if (socketConnections.isEmpty()) _openSockets.remove(key);
- if (_openSockets.isEmpty()) _cancelEvictionTimer();
+ if (socketConnections.isEmpty) _openSockets.remove(key);
+ if (_openSockets.isEmpty) _cancelEvictionTimer();
}
}
@@ -2293,13 +2293,13 @@ class _HttpClient implements HttpClient {
void _(String key, Queue<_SocketConnection> connections) {
// As returned connections are added at the head of the
// list remove from the tail.
- while (!connections.isEmpty()) {
+ while (!connections.isEmpty) {
_SocketConnection socketConn = connections.last();
if (socketConn._idleTime(now).inMilliseconds >
DEFAULT_EVICTION_TIMEOUT) {
connections.removeLast();
socketConn._socket.close();
- if (connections.isEmpty()) emptyKeys.add(key);
+ if (connections.isEmpty) emptyKeys.add(key);
} else {
break;
}
@@ -2310,7 +2310,7 @@ class _HttpClient implements HttpClient {
emptyKeys.forEach((String key) => _openSockets.remove(key));
// If all connections where evicted cancel the eviction timer.
- if (_openSockets.isEmpty()) _cancelEvictionTimer();
+ if (_openSockets.isEmpty) _cancelEvictionTimer();
}
_evictionTimer = new Timer.repeating(10000, _handleEviction);
}
« no previous file with comments | « runtime/bin/file.dart ('k') | runtime/bin/list_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698