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

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

Issue 10874054: Add WARN_UNUSED_RESULT to scoped_refptr::release. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Don't assign NULL to pointer to scoped_refptr. Created 8 years, 3 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 | « gpu/command_buffer/service/context_group.cc ('k') | no next file » | 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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 value.c_str()))); 1286 value.c_str())));
1287 } 1287 }
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->release(); 1296 *http_response_headers = NULL;
1297 1297
1298 const base::DictionaryValue* dict; 1298 const base::DictionaryValue* dict;
1299 const base::ListValue* header_list; 1299 const base::ListValue* header_list;
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
(...skipping 13 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 | « gpu/command_buffer/service/context_group.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698