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

Unified Diff: net/quic/spdy_utils.h

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/spdy_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/spdy_utils.h
diff --git a/net/quic/spdy_utils.h b/net/quic/spdy_utils.h
deleted file mode 100644
index 6a9b15e375ef6a886f22f5815c8a18a6bdcd5f2f..0000000000000000000000000000000000000000
--- a/net/quic/spdy_utils.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2013 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_QUIC_SPDY_UTILS_H_
-#define NET_QUIC_SPDY_UTILS_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <map>
-#include <string>
-
-#include "base/macros.h"
-#include "net/base/net_export.h"
-#include "net/quic/quic_header_list.h"
-#include "net/quic/quic_protocol.h"
-#include "net/spdy/spdy_framer.h"
-
-namespace net {
-
-class NET_EXPORT_PRIVATE SpdyUtils {
- public:
- static std::string SerializeUncompressedHeaders(
- const SpdyHeaderBlock& headers);
-
- // Parses |data| as a std::string containing serialized HTTP/2 HEADERS frame,
- // populating |headers| with the key->value std:pairs found.
- // |content_length| will be populated with the value of the content-length
- // header if one or more are present.
- // Returns true on success, false if parsing fails, or invalid keys are found.
- static bool ParseHeaders(const char* data,
- uint32_t data_len,
- int64_t* content_length,
- SpdyHeaderBlock* headers);
-
- // Parses |data| as a std::string containing serialized HTTP/2 HEADERS frame,
- // populating |trailers| with the key->value std:pairs found.
- // The final offset header will be excluded from |trailers|, and instead the
- // value will be copied to |final_byte_offset|.
- // Returns true on success, false if parsing fails, or invalid keys are found.
- static bool ParseTrailers(const char* data,
- uint32_t data_len,
- size_t* final_byte_offset,
- SpdyHeaderBlock* trailers);
-
- // Copies a list of headers to a SpdyHeaderBlock. Performs similar validation
- // to SpdyFramer::ParseHeaderBlockInBuffer and ParseHeaders, above.
- static bool CopyAndValidateHeaders(const QuicHeaderList& header_list,
- int64_t* content_length,
- SpdyHeaderBlock* headers);
-
- // Copies a list of headers to a SpdyHeaderBlock. Performs similar validation
- // to SpdyFramer::ParseHeaderBlockInBuffer and ParseTrailers, above.
- static bool CopyAndValidateTrailers(const QuicHeaderList& header_list,
- size_t* final_byte_offset,
- SpdyHeaderBlock* trailers);
-
- // Returns URL composed from scheme, authority, and path header
- // values, or empty string if any of those fields are missing.
- static std::string GetUrlFromHeaderBlock(const net::SpdyHeaderBlock& headers);
-
- // Returns hostname, or empty std::string if missing.
- static std::string GetHostNameFromHeaderBlock(const SpdyHeaderBlock& headers);
-
- // Returns true if result of |GetUrlFromHeaderBlock()| is non-empty
- // and is a well-formed URL.
- static bool UrlIsValid(const net::SpdyHeaderBlock& headers);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpdyUtils);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_SPDY_UTILS_H_
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698