OLD | NEW |
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 #ifndef NET_SPDY_SPDY_HTTP_UTILS_H_ | 5 #ifndef NET_SPDY_SPDY_HTTP_UTILS_H_ |
6 #define NET_SPDY_SPDY_HTTP_UTILS_H_ | 6 #define NET_SPDY_SPDY_HTTP_UTILS_H_ |
7 | 7 |
8 #include "net/base/net_export.h" | 8 #include "net/base/net_export.h" |
9 #include "net/base/request_priority.h" | 9 #include "net/base/request_priority.h" |
10 #include "net/spdy/spdy_framer.h" | 10 #include "net/spdy/spdy_framer.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 SpdyMajorVersion protocol_version, | 36 SpdyMajorVersion protocol_version, |
37 bool direct, | 37 bool direct, |
38 SpdyHeaderBlock* headers); | 38 SpdyHeaderBlock* headers); |
39 | 39 |
40 // Create a SpdyHeaderBlock from HttpResponseHeaders. | 40 // Create a SpdyHeaderBlock from HttpResponseHeaders. |
41 NET_EXPORT void CreateSpdyHeadersFromHttpResponse( | 41 NET_EXPORT void CreateSpdyHeadersFromHttpResponse( |
42 const HttpResponseHeaders& response_headers, | 42 const HttpResponseHeaders& response_headers, |
43 SpdyMajorVersion protocol_version, | 43 SpdyMajorVersion protocol_version, |
44 SpdyHeaderBlock* headers); | 44 SpdyHeaderBlock* headers); |
45 | 45 |
| 46 // Create HttpRequestHeaders from SpdyHeaderBlock. |
| 47 NET_EXPORT void ConvertHeaderBlockToHttpRequestHeaders( |
| 48 const SpdyHeaderBlock& spdy_headers, |
| 49 HttpRequestHeaders* http_headers); |
| 50 |
46 // Returns the URL associated with the |headers| by assembling the | 51 // Returns the URL associated with the |headers| by assembling the |
47 // scheme, host and path from the protocol specific keys. | 52 // scheme, host and path from the protocol specific keys. |
48 NET_EXPORT GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers, | 53 NET_EXPORT GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers, |
49 SpdyMajorVersion protocol_version); | 54 SpdyMajorVersion protocol_version); |
50 | 55 |
51 NET_EXPORT SpdyPriority ConvertRequestPriorityToSpdyPriority( | 56 NET_EXPORT SpdyPriority ConvertRequestPriorityToSpdyPriority( |
52 RequestPriority priority, | 57 RequestPriority priority, |
53 SpdyMajorVersion protocol_version); | 58 SpdyMajorVersion protocol_version); |
54 | 59 |
55 NET_EXPORT RequestPriority ConvertSpdyPriorityToRequestPriority( | 60 NET_EXPORT RequestPriority ConvertSpdyPriorityToRequestPriority( |
56 SpdyPriority priority, | 61 SpdyPriority priority, |
57 SpdyMajorVersion protocol_version); | 62 SpdyMajorVersion protocol_version); |
58 | 63 |
59 } // namespace net | 64 } // namespace net |
60 | 65 |
61 #endif // NET_SPDY_SPDY_HTTP_UTILS_H_ | 66 #endif // NET_SPDY_SPDY_HTTP_UTILS_H_ |
OLD | NEW |