OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "net/quic/quic_client_promised_info.h" | 5 #include "net/quic/quic_client_promised_info.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 push_promise_[":path"] = "/bar"; | 94 push_promise_[":path"] = "/bar"; |
95 push_promise_[":authority"] = "www.google.com"; | 95 push_promise_[":authority"] = "www.google.com"; |
96 push_promise_[":version"] = "HTTP/1.1"; | 96 push_promise_[":version"] = "HTTP/1.1"; |
97 push_promise_[":method"] = "GET"; | 97 push_promise_[":method"] = "GET"; |
98 push_promise_[":scheme"] = "https"; | 98 push_promise_[":scheme"] = "https"; |
99 | 99 |
100 promise_url_ = SpdyUtils::GetUrlFromHeaderBlock(push_promise_); | 100 promise_url_ = SpdyUtils::GetUrlFromHeaderBlock(push_promise_); |
101 serialized_push_promise_ = | 101 serialized_push_promise_ = |
102 SpdyUtils::SerializeUncompressedHeaders(push_promise_); | 102 SpdyUtils::SerializeUncompressedHeaders(push_promise_); |
103 | 103 |
104 client_request_ = SpdyHeaderBlock(push_promise_); | 104 client_request_ = push_promise_.Clone(); |
105 } | 105 } |
106 | 106 |
107 class StreamVisitor : public QuicSpdyClientStream::Visitor { | 107 class StreamVisitor : public QuicSpdyClientStream::Visitor { |
108 void OnClose(QuicSpdyStream* stream) override { | 108 void OnClose(QuicSpdyStream* stream) override { |
109 DVLOG(1) << "stream " << stream->id(); | 109 DVLOG(1) << "stream " << stream->id(); |
110 } | 110 } |
111 }; | 111 }; |
112 | 112 |
113 class PushPromiseDelegate : public QuicClientPushPromiseIndex::Delegate { | 113 class PushPromiseDelegate : public QuicClientPushPromiseIndex::Delegate { |
114 public: | 114 public: |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 EXPECT_FALSE(delegate.rendezvous_fired()); | 371 EXPECT_FALSE(delegate.rendezvous_fired()); |
372 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); | 372 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); |
373 | 373 |
374 // Promise is gone | 374 // Promise is gone |
375 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); | 375 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); |
376 } | 376 } |
377 | 377 |
378 } // namespace | 378 } // namespace |
379 } // namespace test | 379 } // namespace test |
380 } // namespace net | 380 } // namespace net |
OLD | NEW |