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

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

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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 | « net/http/http_request_headers.cc ('k') | printing/page_size_margins.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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 return dict; 1316 return dict;
1317 } 1317 }
1318 1318
1319 // static 1319 // static
1320 bool HttpResponseHeaders::FromNetLogParam( 1320 bool HttpResponseHeaders::FromNetLogParam(
1321 const base::Value* event_param, 1321 const base::Value* event_param,
1322 scoped_refptr<HttpResponseHeaders>* http_response_headers) { 1322 scoped_refptr<HttpResponseHeaders>* http_response_headers) {
1323 http_response_headers->release(); 1323 http_response_headers->release();
1324 1324
1325 const base::DictionaryValue* dict; 1325 const base::DictionaryValue* dict;
1326 base::ListValue* header_list; 1326 const base::ListValue* header_list;
1327 1327
1328 if (!event_param || 1328 if (!event_param ||
1329 !event_param->GetAsDictionary(&dict) || 1329 !event_param->GetAsDictionary(&dict) ||
1330 !dict->GetList("headers", &header_list)) { 1330 !dict->GetList("headers", &header_list)) {
1331 return false; 1331 return false;
1332 } 1332 }
1333 1333
1334 std::string raw_headers; 1334 std::string raw_headers;
1335 for (base::ListValue::const_iterator it = header_list->begin(); 1335 for (base::ListValue::const_iterator it = header_list->begin();
1336 it != header_list->end(); 1336 it != header_list->end();
(...skipping 10 matching lines...) Expand all
1347 return true; 1347 return true;
1348 } 1348 }
1349 1349
1350 bool HttpResponseHeaders::IsChunkEncoded() const { 1350 bool HttpResponseHeaders::IsChunkEncoded() const {
1351 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. 1351 // Ignore spurious chunked responses from HTTP/1.0 servers and proxies.
1352 return GetHttpVersion() >= HttpVersion(1, 1) && 1352 return GetHttpVersion() >= HttpVersion(1, 1) &&
1353 HasHeaderValue("Transfer-Encoding", "chunked"); 1353 HasHeaderValue("Transfer-Encoding", "chunked");
1354 } 1354 }
1355 1355
1356 } // namespace net 1356 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_request_headers.cc ('k') | printing/page_size_margins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698