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

Side by Side Diff: net/quic/quic_client_promised_info_test.cc

Issue 2102253003: Make SpdyHeaderBlock non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS fix. Created 4 years, 5 months 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/quic_client_promised_info.cc ('k') | net/quic/quic_headers_stream_test.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_client_promised_info.cc ('k') | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698