OLD | NEW |
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_CORE_SPDY_UTILS_H_ | 5 #ifndef NET_QUIC_CORE_SPDY_UTILS_H_ |
6 #define NET_QUIC_CORE_SPDY_UTILS_H_ | 6 #define NET_QUIC_CORE_SPDY_UTILS_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <cstdint> | 9 #include <cstdint> |
10 #include <string> | 10 #include <string> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // Returns true if result of |GetUrlFromHeaderBlock()| is non-empty | 48 // Returns true if result of |GetUrlFromHeaderBlock()| is non-empty |
49 // and is a well-formed URL. | 49 // and is a well-formed URL. |
50 static bool UrlIsValid(const SpdyHeaderBlock& headers); | 50 static bool UrlIsValid(const SpdyHeaderBlock& headers); |
51 | 51 |
52 // Populates the fields of |headers| to make a GET request of |url|, | 52 // Populates the fields of |headers| to make a GET request of |url|, |
53 // which must be fully-qualified. | 53 // which must be fully-qualified. |
54 static bool PopulateHeaderBlockFromUrl(const std::string url, | 54 static bool PopulateHeaderBlockFromUrl(const std::string url, |
55 SpdyHeaderBlock* headers); | 55 SpdyHeaderBlock* headers); |
56 | 56 |
| 57 static bool IsServerPushStream(QuicStreamId id) { return id % 2 == 0; } |
| 58 |
57 private: | 59 private: |
58 DISALLOW_COPY_AND_ASSIGN(SpdyUtils); | 60 DISALLOW_COPY_AND_ASSIGN(SpdyUtils); |
59 }; | 61 }; |
60 | 62 |
61 } // namespace net | 63 } // namespace net |
62 | 64 |
63 #endif // NET_QUIC_CORE_SPDY_UTILS_H_ | 65 #endif // NET_QUIC_CORE_SPDY_UTILS_H_ |
OLD | NEW |