OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PUSH_PROMISE_DELEGATE_H_ |
| 6 #define NET_TOOLS_QUIC_TEST_TOOLS_PUSH_PROMISE_DELEGATE_H_ |
| 7 |
| 8 #include "net/quic/core/quic_client_push_promise_index.h" |
| 9 |
| 10 namespace net { |
| 11 namespace test { |
| 12 |
| 13 class PushPromiseDelegate : public QuicClientPushPromiseIndex::Delegate { |
| 14 public: |
| 15 explicit PushPromiseDelegate(bool match); |
| 16 |
| 17 bool CheckVary(const SpdyHeaderBlock& client_request, |
| 18 const SpdyHeaderBlock& promise_request, |
| 19 const SpdyHeaderBlock& promise_response) override; |
| 20 |
| 21 void OnRendezvousResult(QuicSpdyStream* stream) override; |
| 22 |
| 23 QuicSpdyStream* rendezvous_stream() { return rendezvous_stream_; } |
| 24 bool rendezvous_fired() { return rendezvous_fired_; } |
| 25 |
| 26 private: |
| 27 bool match_; |
| 28 bool rendezvous_fired_; |
| 29 QuicSpdyStream* rendezvous_stream_; |
| 30 }; |
| 31 |
| 32 } // namespace test |
| 33 } // namespace net |
| 34 |
| 35 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PUSH_PROMISE_DELEGATE_H_ |
OLD | NEW |