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

Side by Side Diff: net/quic/core/quic_client_session_base.h

Issue 2497083002: Server push cancellation: clean up the code to make sure shared code is in sync with internal code. (Closed)
Patch Set: Created 4 years, 1 month 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/quic/core/quic_client_promised_info_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('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 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // Called by |QuicSpdyClientStream| on receipt of response headers, 59 // Called by |QuicSpdyClientStream| on receipt of response headers,
60 // needed to detect promised server push streams, as part of 60 // needed to detect promised server push streams, as part of
61 // client-request to push-stream rendezvous. 61 // client-request to push-stream rendezvous.
62 void OnInitialHeadersComplete(QuicStreamId stream_id, 62 void OnInitialHeadersComplete(QuicStreamId stream_id,
63 const SpdyHeaderBlock& response_headers); 63 const SpdyHeaderBlock& response_headers);
64 64
65 // Called by |QuicSpdyClientStream| on receipt of PUSH_PROMISE, does 65 // Called by |QuicSpdyClientStream| on receipt of PUSH_PROMISE, does
66 // some session level validation and creates the 66 // some session level validation and creates the
67 // |QuicClientPromisedInfo| inserting into maps by (promised) id and 67 // |QuicClientPromisedInfo| inserting into maps by (promised) id and
68 // url. Returns true if a new push promise is accepted. Reset the promised and 68 // url. Returns true if a new push promise is accepted. Reset the promised
69 // returns false otherwiese. 69 // stream and returns false otherwiese.
70 virtual bool HandlePromised(QuicStreamId associated_id, 70 virtual bool HandlePromised(QuicStreamId associated_id,
71 QuicStreamId promised_id, 71 QuicStreamId promised_id,
72 const SpdyHeaderBlock& headers); 72 const SpdyHeaderBlock& headers);
73 73
74 // For cross-origin server push, this should verify the server is 74 // For cross-origin server push, this should verify the server is
75 // authoritative per [RFC2818], Section 3. Roughly, subjectAltName 75 // authoritative per [RFC2818], Section 3. Roughly, subjectAltName
76 // std::list in the certificate should contain a matching DNS name, or IP 76 // std::list in the certificate should contain a matching DNS name, or IP
77 // address. |hostname| is derived from the ":authority" header field of 77 // address. |hostname| is derived from the ":authority" header field of
78 // the PUSH_PROMISE frame, port if present there will be dropped. 78 // the PUSH_PROMISE frame, port if present there will be dropped.
79 virtual bool IsAuthorized(const std::string& hostname) = 0; 79 virtual bool IsAuthorized(const std::string& hostname) = 0;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 QuicClientPushPromiseIndex* push_promise_index_; 129 QuicClientPushPromiseIndex* push_promise_index_;
130 QuicPromisedByIdMap promised_by_id_; 130 QuicPromisedByIdMap promised_by_id_;
131 QuicStreamId largest_promised_stream_id_; 131 QuicStreamId largest_promised_stream_id_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase); 133 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase);
134 }; 134 };
135 135
136 } // namespace net 136 } // namespace net
137 137
138 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ 138 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_client_promised_info_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698