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

Side by Side Diff: net/quic/spdy_utils.h

Issue 1561383002: relnote: add new unused functions for client side of QUIC server push. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@21_CL_111427940
Patch Set: port spdy_utils_test.cc Created 4 years, 11 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/net.gypi ('k') | net/quic/spdy_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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_QUIC_SPDY_UTILS_H_ 5 #ifndef NET_QUIC_SPDY_UTILS_H_
6 #define NET_QUIC_SPDY_UTILS_H_ 6 #define NET_QUIC_SPDY_UTILS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 25 matching lines...) Expand all
36 // Parses |data| as a std::string containing serialized HTTP/2 HEADERS frame, 36 // Parses |data| as a std::string containing serialized HTTP/2 HEADERS frame,
37 // populating |trailers| with the key->value std:pairs found. 37 // populating |trailers| with the key->value std:pairs found.
38 // The final offset header will be excluded from |trailers|, and instead the 38 // The final offset header will be excluded from |trailers|, and instead the
39 // value will be copied to |final_byte_offset|. 39 // value will be copied to |final_byte_offset|.
40 // Returns true on success, false if parsing fails, or invalid keys are found. 40 // Returns true on success, false if parsing fails, or invalid keys are found.
41 static bool ParseTrailers(const char* data, 41 static bool ParseTrailers(const char* data,
42 uint32_t data_len, 42 uint32_t data_len,
43 size_t* final_byte_offset, 43 size_t* final_byte_offset,
44 SpdyHeaderBlock* trailers); 44 SpdyHeaderBlock* trailers);
45 45
46 // Returns URL composed from scheme, authority, and path header
47 // values, or empty string if any of those fields are missing.
48 static std::string GetUrlFromHeaderBlock(const net::SpdyHeaderBlock& headers);
49
50 // Returns true if result of |GetUrlFromHeaderBlock()| is non-empty
51 // and is a well-formed URL.
52 static bool UrlIsValid(const net::SpdyHeaderBlock& headers);
53
46 private: 54 private:
47 DISALLOW_COPY_AND_ASSIGN(SpdyUtils); 55 DISALLOW_COPY_AND_ASSIGN(SpdyUtils);
48 }; 56 };
49 57
50 } // namespace net 58 } // namespace net
51 59
52 #endif // NET_QUIC_SPDY_UTILS_H_ 60 #endif // NET_QUIC_SPDY_UTILS_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/quic/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698