diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-15 23:36:29 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-15 23:36:29 +0000 |
commit | fa522e78ecd75c3de24897a4dd47292e8712a287 (patch) | |
tree | 03256f7608435649b390c5e8697e5ced615c390a /net/spdy/spdy_http_utils.h | |
parent | 534ea0a5f1f2123b13a1c3bd32fcbf028d549765 (diff) | |
download | chromium_src-fa522e78ecd75c3de24897a4dd47292e8712a287.zip chromium_src-fa522e78ecd75c3de24897a4dd47292e8712a287.tar.gz chromium_src-fa522e78ecd75c3de24897a4dd47292e8712a287.tar.bz2 |
Move two methods in spdy_http_stream.cc from an anonymous namespace
into public static methods of SpdyHttpStream. This is in preparation
for the SpdyProxyClientSocket which desires to make use of this
functionality.
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock.
// |info| output parameter for the HttpResponseInfo.
// Returns true if successfully converted. False if there was a failure
// or if the SpdyHeaderBlock was invalid.
static bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers,
net::HttpResponseInfo* response);
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
static void CreateSpdyHeadersFromHttpRequest(const net::HttpRequestInfo& info,
spdy::SpdyHeaderBlock* headers,
bool direct);
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3441004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_http_utils.h')
-rw-r--r-- | net/spdy/spdy_http_utils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net/spdy/spdy_http_utils.h b/net/spdy/spdy_http_utils.h new file mode 100644 index 0000000..0889921 --- /dev/null +++ b/net/spdy/spdy_http_utils.h @@ -0,0 +1,32 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_ +#define NET_SPDY_SPDY_HTTP_UTILS_H_ +#pragma once + +#include "net/spdy/spdy_framer.h" + +namespace net { + +class HttpResponseInfo; +class HttpRequestInfo; + +// Convert a SpdyHeaderBlock into an HttpResponseInfo. +// |headers| input parameter with the SpdyHeaderBlock. +// |info| output parameter for the HttpResponseInfo. +// Returns true if successfully converted. False if there was a failure +// or if the SpdyHeaderBlock was invalid. +bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers, + HttpResponseInfo* response); + +// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from +// a HttpRequestInfo block. +void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info, + spdy::SpdyHeaderBlock* headers, + bool direct); + +} // namespace net + +#endif // NET_SPDY_SPDY_HTTP_UTILS_H_ |