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

Side by Side Diff: net/spdy/spdy_http_utils.h

Issue 2832973003: Split net/spdy into core and chromium subdirectories. (Closed)
Patch Set: Fix some more build rules. Created 3 years, 8 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/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_http_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
6 #define NET_SPDY_SPDY_HTTP_UTILS_H_
7
8 #include "net/base/net_export.h"
9 #include "net/base/request_priority.h"
10 #include "net/spdy/spdy_framer.h"
11 #include "net/spdy/spdy_header_block.h"
12 #include "net/spdy/spdy_protocol.h"
13 #include "url/gurl.h"
14
15 namespace net {
16
17 class HttpResponseInfo;
18 struct HttpRequestInfo;
19 class HttpRequestHeaders;
20
21 // Convert a SpdyHeaderBlock into an HttpResponseInfo.
22 // |headers| input parameter with the SpdyHeaderBlock.
23 // |response| output parameter for the HttpResponseInfo.
24 // Returns true if successfully converted. False if the SpdyHeaderBlock is
25 // incomplete (e.g. missing 'status' or 'version').
26 NET_EXPORT bool SpdyHeadersToHttpResponse(
27 const SpdyHeaderBlock& headers,
28 HttpResponseInfo* response);
29
30 // Create a SpdyHeaderBlock from HttpRequestInfo and HttpRequestHeaders.
31 NET_EXPORT void CreateSpdyHeadersFromHttpRequest(
32 const HttpRequestInfo& info,
33 const HttpRequestHeaders& request_headers,
34 bool direct,
35 SpdyHeaderBlock* headers);
36
37 // Create HttpRequestHeaders from SpdyHeaderBlock.
38 NET_EXPORT void ConvertHeaderBlockToHttpRequestHeaders(
39 const SpdyHeaderBlock& spdy_headers,
40 HttpRequestHeaders* http_headers);
41
42 // Returns the URL associated with the |headers| by assembling the
43 // scheme, host and path from the protocol specific keys.
44 NET_EXPORT GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers);
45
46 NET_EXPORT SpdyPriority
47 ConvertRequestPriorityToSpdyPriority(RequestPriority priority);
48
49 NET_EXPORT RequestPriority
50 ConvertSpdyPriorityToRequestPriority(SpdyPriority priority);
51
52 } // namespace net
53
54 #endif // NET_SPDY_SPDY_HTTP_UTILS_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_http_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698