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

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

Issue 11128003: fix uninitialized variable warning for vs2012 compilation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +1 symmetry 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return dict; 200 return dict;
201 } 201 }
202 202
203 // static 203 // static
204 bool HttpRequestHeaders::FromNetLogParam(const base::Value* event_param, 204 bool HttpRequestHeaders::FromNetLogParam(const base::Value* event_param,
205 HttpRequestHeaders* headers, 205 HttpRequestHeaders* headers,
206 std::string* request_line) { 206 std::string* request_line) {
207 headers->Clear(); 207 headers->Clear();
208 *request_line = ""; 208 *request_line = "";
209 209
210 const base::DictionaryValue* dict; 210 const base::DictionaryValue* dict = NULL;
211 const base::ListValue* header_list; 211 const base::ListValue* header_list = NULL;
212 212
213 if (!event_param || 213 if (!event_param ||
214 !event_param->GetAsDictionary(&dict) || 214 !event_param->GetAsDictionary(&dict) ||
215 !dict->GetList("headers", &header_list) || 215 !dict->GetList("headers", &header_list) ||
216 !dict->GetString("line", request_line)) { 216 !dict->GetString("line", request_line)) {
217 return false; 217 return false;
218 } 218 }
219 219
220 for (base::ListValue::const_iterator it = header_list->begin(); 220 for (base::ListValue::const_iterator it = header_list->begin();
221 it != header_list->end(); 221 it != header_list->end();
(...skipping 27 matching lines...) Expand all
249 it != headers_.end(); ++it) { 249 it != headers_.end(); ++it) {
250 if (key.length() == it->key.length() && 250 if (key.length() == it->key.length() &&
251 !base::strncasecmp(key.data(), it->key.data(), key.length())) 251 !base::strncasecmp(key.data(), it->key.data(), key.length()))
252 return it; 252 return it;
253 } 253 }
254 254
255 return headers_.end(); 255 return headers_.end();
256 } 256 }
257 257
258 } // namespace net 258 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698