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

Side by Side Diff: sdk/lib/io/http_headers.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/html_common/filtered_element_list.dart ('k') | sdk/lib/io/http_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.io; 5 part of dart.io;
6 6
7 class _HttpHeaders implements HttpHeaders { 7 class _HttpHeaders implements HttpHeaders {
8 _HttpHeaders(String this.protocolVersion) 8 _HttpHeaders(String this.protocolVersion)
9 : _headers = new Map<String, List<String>>(); 9 : _headers = new Map<String, List<String>>();
10 10
(...skipping 30 matching lines...) Expand all
41 add(name, value); 41 add(name, value);
42 } 42 }
43 43
44 void remove(String name, Object value) { 44 void remove(String name, Object value) {
45 _checkMutable(); 45 _checkMutable();
46 name = name.toLowerCase(); 46 name = name.toLowerCase();
47 List<String> values = _headers[name]; 47 List<String> values = _headers[name];
48 if (values != null) { 48 if (values != null) {
49 int index = values.indexOf(value); 49 int index = values.indexOf(value);
50 if (index != -1) { 50 if (index != -1) {
51 values.removeRange(index, 1); 51 values.removeRange(index, index + 1);
52 } 52 }
53 if (values.length == 0) _headers.remove(name); 53 if (values.length == 0) _headers.remove(name);
54 } 54 }
55 } 55 }
56 56
57 void removeAll(String name) { 57 void removeAll(String name) {
58 _checkMutable(); 58 _checkMutable();
59 name = name.toLowerCase(); 59 name = name.toLowerCase();
60 _headers.remove(name); 60 _headers.remove(name);
61 } 61 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 764
765 String name; 765 String name;
766 String value; 766 String value;
767 DateTime expires; 767 DateTime expires;
768 int maxAge; 768 int maxAge;
769 String domain; 769 String domain;
770 String path; 770 String path;
771 bool httpOnly = false; 771 bool httpOnly = false;
772 bool secure = false; 772 bool secure = false;
773 } 773 }
OLDNEW
« no previous file with comments | « sdk/lib/html/html_common/filtered_element_list.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698