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

Side by Side Diff: net/http/http_response_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 | « net/http/http_request_headers.cc ('k') | net/spdy/spdy_header_block.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 // The rules for header parsing were borrowed from Firefox: 5 // The rules for header parsing were borrowed from Firefox:
6 // http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpRespo nseHead.cpp 6 // http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpRespo nseHead.cpp
7 // The rules for parsing content-types were also borrowed from Firefox: 7 // The rules for parsing content-types were also borrowed from Firefox:
8 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834 8 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834
9 9
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 dict->Set("headers", headers); 1288 dict->Set("headers", headers);
1289 return dict; 1289 return dict;
1290 } 1290 }
1291 1291
1292 // static 1292 // static
1293 bool HttpResponseHeaders::FromNetLogParam( 1293 bool HttpResponseHeaders::FromNetLogParam(
1294 const base::Value* event_param, 1294 const base::Value* event_param,
1295 scoped_refptr<HttpResponseHeaders>* http_response_headers) { 1295 scoped_refptr<HttpResponseHeaders>* http_response_headers) {
1296 *http_response_headers = NULL; 1296 *http_response_headers = NULL;
1297 1297
1298 const base::DictionaryValue* dict; 1298 const base::DictionaryValue* dict = NULL;
1299 const base::ListValue* header_list; 1299 const base::ListValue* header_list = NULL;
1300 1300
1301 if (!event_param || 1301 if (!event_param ||
1302 !event_param->GetAsDictionary(&dict) || 1302 !event_param->GetAsDictionary(&dict) ||
1303 !dict->GetList("headers", &header_list)) { 1303 !dict->GetList("headers", &header_list)) {
1304 return false; 1304 return false;
1305 } 1305 }
1306 1306
1307 std::string raw_headers; 1307 std::string raw_headers;
1308 for (base::ListValue::const_iterator it = header_list->begin(); 1308 for (base::ListValue::const_iterator it = header_list->begin();
1309 it != header_list->end(); 1309 it != header_list->end();
(...skipping 10 matching lines...) Expand all
1320 return true; 1320 return true;
1321 } 1321 }
1322 1322
1323 bool HttpResponseHeaders::IsChunkEncoded() const { 1323 bool HttpResponseHeaders::IsChunkEncoded() const {
1324 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. 1324 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies.
1325 return GetHttpVersion() >= HttpVersion(1, 1) && 1325 return GetHttpVersion() >= HttpVersion(1, 1) &&
1326 HasHeaderValue("Transfer-Encoding", "chunked"); 1326 HasHeaderValue("Transfer-Encoding", "chunked");
1327 } 1327 }
1328 1328
1329 } // namespace net 1329 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_request_headers.cc ('k') | net/spdy/spdy_header_block.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698