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

Side by Side Diff: runtime/bin/http_impl.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/buffer_list.dart ('k') | runtime/bin/path_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _HttpHeaders implements HttpHeaders { 5 class _HttpHeaders implements HttpHeaders {
6 _HttpHeaders() : _headers = new Map<String, List<String>>(); 6 _HttpHeaders() : _headers = new Map<String, List<String>>();
7 7
8 List<String> operator[](String name) { 8 List<String> operator[](String name) {
9 name = name.toLowerCase(); 9 name = name.toLowerCase();
10 return _headers[name]; 10 return _headers[name];
(...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2287 // If there is currently no eviction timer start one. 2287 // If there is currently no eviction timer start one.
2288 if (_evictionTimer == null) { 2288 if (_evictionTimer == null) {
2289 void _handleEviction(Timer timer) { 2289 void _handleEviction(Timer timer) {
2290 Date now = new Date.now(); 2290 Date now = new Date.now();
2291 List<String> emptyKeys = new List<String>(); 2291 List<String> emptyKeys = new List<String>();
2292 _openSockets.forEach( 2292 _openSockets.forEach(
2293 void _(String key, Queue<_SocketConnection> connections) { 2293 void _(String key, Queue<_SocketConnection> connections) {
2294 // As returned connections are added at the head of the 2294 // As returned connections are added at the head of the
2295 // list remove from the tail. 2295 // list remove from the tail.
2296 while (!connections.isEmpty) { 2296 while (!connections.isEmpty) {
2297 _SocketConnection socketConn = connections.last(); 2297 _SocketConnection socketConn = connections.last;
2298 if (socketConn._idleTime(now).inMilliseconds > 2298 if (socketConn._idleTime(now).inMilliseconds >
2299 DEFAULT_EVICTION_TIMEOUT) { 2299 DEFAULT_EVICTION_TIMEOUT) {
2300 connections.removeLast(); 2300 connections.removeLast();
2301 socketConn._socket.close(); 2301 socketConn._socket.close();
2302 if (connections.isEmpty) emptyKeys.add(key); 2302 if (connections.isEmpty) emptyKeys.add(key);
2303 } else { 2303 } else {
2304 break; 2304 break;
2305 } 2305 }
2306 } 2306 }
2307 }); 2307 });
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 2346
2347 2347
2348 class _RedirectInfo implements RedirectInfo { 2348 class _RedirectInfo implements RedirectInfo {
2349 const _RedirectInfo(int this.statusCode, 2349 const _RedirectInfo(int this.statusCode,
2350 String this.method, 2350 String this.method,
2351 Uri this.location); 2351 Uri this.location);
2352 final int statusCode; 2352 final int statusCode;
2353 final String method; 2353 final String method;
2354 final Uri location; 2354 final Uri location;
2355 } 2355 }
OLDNEW
« no previous file with comments | « runtime/bin/buffer_list.dart ('k') | runtime/bin/path_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698