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

Side by Side Diff: net/quic/quartc/quartc_session_test.cc

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr Created 4 years 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/quartc/quartc_session.cc ('k') | net/quic/quartc/quartc_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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/quartc/quartc_session.h" 5 #include "net/quic/quartc/quartc_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 public: 51 public:
52 explicit FakeProofSource(bool success) : success_(success) {} 52 explicit FakeProofSource(bool success) : success_(success) {}
53 53
54 // ProofSource override. 54 // ProofSource override.
55 bool GetProof(const QuicSocketAddress& server_ip, 55 bool GetProof(const QuicSocketAddress& server_ip,
56 const std::string& hostname, 56 const std::string& hostname,
57 const std::string& server_config, 57 const std::string& server_config,
58 net::QuicVersion quic_version, 58 net::QuicVersion quic_version,
59 base::StringPiece chlo_hash, 59 base::StringPiece chlo_hash,
60 const net::QuicTagVector& connection_options, 60 const net::QuicTagVector& connection_options,
61 scoped_refptr<net::ProofSource::Chain>* out_certs, 61 QuicReferenceCountedPointer<net::ProofSource::Chain>* out_certs,
62 net::QuicCryptoProof* proof) override { 62 net::QuicCryptoProof* proof) override {
63 if (success_) { 63 if (success_) {
64 std::vector<std::string> certs; 64 std::vector<std::string> certs;
65 certs.push_back("Required to establish handshake"); 65 certs.push_back("Required to establish handshake");
66 *out_certs = new ProofSource::Chain(certs); 66 *out_certs = new ProofSource::Chain(certs);
67 proof->signature = "Signature"; 67 proof->signature = "Signature";
68 proof->leaf_cert_scts = "Time"; 68 proof->leaf_cert_scts = "Time";
69 } 69 }
70 return success_; 70 return success_;
71 } 71 }
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 EXPECT_FALSE(client_peer_->IsClosedStream(id)); 501 EXPECT_FALSE(client_peer_->IsClosedStream(id));
502 stream->SetDelegate(client_peer_->stream_delegate()); 502 stream->SetDelegate(client_peer_->stream_delegate());
503 stream->Close(); 503 stream->Close();
504 RunLoopWithTimeout(); 504 RunLoopWithTimeout();
505 EXPECT_TRUE(client_peer_->IsClosedStream(id)); 505 EXPECT_TRUE(client_peer_->IsClosedStream(id));
506 } 506 }
507 507
508 } // namespace 508 } // namespace
509 } // namespace test 509 } // namespace test
510 } // namespace net 510 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quartc/quartc_session.cc ('k') | net/quic/quartc/quartc_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698