OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_CLIENT_SESSION_BASE_H_ | 5 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
6 #define NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ | 6 #define NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 | 69 |
70 // Called by |QuicSpdyClientStream| on receipt of response headers, | 70 // Called by |QuicSpdyClientStream| on receipt of response headers, |
71 // needed to detect promised server push streams, as part of | 71 // needed to detect promised server push streams, as part of |
72 // client-request to push-stream rendezvous. | 72 // client-request to push-stream rendezvous. |
73 void OnInitialHeadersComplete(QuicStreamId stream_id, | 73 void OnInitialHeadersComplete(QuicStreamId stream_id, |
74 const SpdyHeaderBlock& response_headers); | 74 const SpdyHeaderBlock& response_headers); |
75 | 75 |
76 // Called by |QuicSpdyClientStream| on receipt of PUSH_PROMISE, does | 76 // Called by |QuicSpdyClientStream| on receipt of PUSH_PROMISE, does |
77 // some session level validation and creates the | 77 // some session level validation and creates the |
78 // |QuicClientPromisedInfo| inserting into maps by (promised) id and | 78 // |QuicClientPromisedInfo| inserting into maps by (promised) id and |
79 // url. | 79 // url. Returns true if a new push promise is accepted. Reset the promised and |
80 virtual void HandlePromised(QuicStreamId associated_id, | 80 // returns false otherwiese. |
81 virtual bool HandlePromised(QuicStreamId associated_id, | |
Ryan Hamilton
2016/11/08 22:27:01
You'll merge this back, right?
Buck
2016/11/08 22:51:28
Should tests quic_chromium_client_session_test.cc
Zhongyi Shi
2016/11/09 19:07:41
Yup.
| |
81 QuicStreamId promised_id, | 82 QuicStreamId promised_id, |
82 const SpdyHeaderBlock& headers); | 83 const SpdyHeaderBlock& headers); |
83 | 84 |
84 // For cross-origin server push, this should verify the server is | 85 // For cross-origin server push, this should verify the server is |
85 // authoritative per [RFC2818], Section 3. Roughly, subjectAltName | 86 // authoritative per [RFC2818], Section 3. Roughly, subjectAltName |
86 // std::list in the certificate should contain a matching DNS name, or IP | 87 // std::list in the certificate should contain a matching DNS name, or IP |
87 // address. |hostname| is derived from the ":authority" header field of | 88 // address. |hostname| is derived from the ":authority" header field of |
88 // the PUSH_PROMISE frame, port if present there will be dropped. | 89 // the PUSH_PROMISE frame, port if present there will be dropped. |
89 virtual bool IsAuthorized(const std::string& hostname) = 0; | 90 virtual bool IsAuthorized(const std::string& hostname) = 0; |
90 | 91 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 QuicClientPushPromiseIndex* push_promise_index_; | 140 QuicClientPushPromiseIndex* push_promise_index_; |
140 QuicPromisedByIdMap promised_by_id_; | 141 QuicPromisedByIdMap promised_by_id_; |
141 QuicStreamId largest_promised_stream_id_; | 142 QuicStreamId largest_promised_stream_id_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase); | 144 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace net | 147 } // namespace net |
147 | 148 |
148 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ | 149 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
OLD | NEW |