OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ | 5 #ifndef IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |
6 #define IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ | 6 #define IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "net/http/http_response_headers.h" | 8 #include "net/http/http_response_headers.h" |
10 | 9 |
11 @class NSHTTPURLResponse; | 10 @class NSHTTPURLResponse; |
12 | 11 |
13 namespace net { | 12 namespace net { |
14 | 13 |
15 // Placeholder status description since the actual text from the headers is not | 14 // Placeholder status description since the actual text from the headers is not |
16 // available. | 15 // available. |
17 extern const std::string kDummyHttpStatusDescription; | 16 extern const std::string kDummyHttpStatusDescription; |
18 | 17 |
19 // Constructs a net::HttpResponseHeaders from |response|. | 18 // Constructs a net::HttpResponseHeaders from |response|. |
20 // Note: The HTTP version and the status code description are not accessible | 19 // Note: The HTTP version and the status code description are not accessible |
21 // from NSHTTPURLResponse, so HTTP/1.0 and kDummyHttpStatusDescription will | 20 // from NSHTTPURLResponse, so HTTP/1.0 and kDummyHttpStatusDescription will |
22 // be used in the status line instead. | 21 // be used in the status line instead. |
23 scoped_refptr<HttpResponseHeaders> CreateHeadersFromNSHTTPURLResponse( | 22 scoped_refptr<HttpResponseHeaders> CreateHeadersFromNSHTTPURLResponse( |
24 NSHTTPURLResponse* response); | 23 NSHTTPURLResponse* response); |
25 | 24 |
26 } // namespace net | 25 } // namespace net |
27 | 26 |
28 #endif // IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ | 27 #endif // IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |
OLD | NEW |