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

Side by Side Diff: net/http/http_request_headers.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 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
« no previous file with comments | « mojo/common/values_struct_traits.h ('k') | net/http/http_response_headers.cc » ('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 Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_request_headers.h" 5 #include "net/http/http_request_headers.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 !event_param->GetAsDictionary(&dict) || 220 !event_param->GetAsDictionary(&dict) ||
221 !dict->GetList("headers", &header_list) || 221 !dict->GetList("headers", &header_list) ||
222 !dict->GetString("line", request_line)) { 222 !dict->GetString("line", request_line)) {
223 return false; 223 return false;
224 } 224 }
225 225
226 for (base::ListValue::const_iterator it = header_list->begin(); 226 for (base::ListValue::const_iterator it = header_list->begin();
227 it != header_list->end(); 227 it != header_list->end();
228 ++it) { 228 ++it) {
229 std::string header_line; 229 std::string header_line;
230 if (!it->GetAsString(&header_line)) { 230 if (!(*it)->GetAsString(&header_line)) {
231 headers->Clear(); 231 headers->Clear();
232 *request_line = ""; 232 *request_line = "";
233 return false; 233 return false;
234 } 234 }
235 headers->AddHeaderFromString(header_line); 235 headers->AddHeaderFromString(header_line);
236 } 236 }
237 return true; 237 return true;
238 } 238 }
239 239
240 HttpRequestHeaders::HeaderVector::iterator 240 HttpRequestHeaders::HeaderVector::iterator
(...skipping 12 matching lines...) Expand all
253 for (HeaderVector::const_iterator it = headers_.begin(); 253 for (HeaderVector::const_iterator it = headers_.begin();
254 it != headers_.end(); ++it) { 254 it != headers_.end(); ++it) {
255 if (base::EqualsCaseInsensitiveASCII(key, it->key)) 255 if (base::EqualsCaseInsensitiveASCII(key, it->key))
256 return it; 256 return it;
257 } 257 }
258 258
259 return headers_.end(); 259 return headers_.end();
260 } 260 }
261 261
262 } // namespace net 262 } // namespace net
OLDNEW
« no previous file with comments | « mojo/common/values_struct_traits.h ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698