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

Side by Side Diff: net/tools/quic/quic_client_base.h

Issue 1397983007: relnote: remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rch_insecure_quic
Patch Set: Compile fix Created 5 years, 2 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/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_base.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 // A base class for the toy client, which connects to a specified port and sends 5 // A base class for the toy client, which connects to a specified port and sends
6 // QUIC request to that endpoint. 6 // QUIC request to that endpoint.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
10 10
(...skipping 29 matching lines...) Expand all
40 ~DummyPacketWriterFactory() override; 40 ~DummyPacketWriterFactory() override;
41 41
42 QuicPacketWriter* Create(QuicConnection* connection) const override; 42 QuicPacketWriter* Create(QuicConnection* connection) const override;
43 43
44 private: 44 private:
45 QuicPacketWriter* writer_; 45 QuicPacketWriter* writer_;
46 }; 46 };
47 47
48 QuicClientBase(const QuicServerId& server_id, 48 QuicClientBase(const QuicServerId& server_id,
49 const QuicVersionVector& supported_versions, 49 const QuicVersionVector& supported_versions,
50 const QuicConfig& config); 50 const QuicConfig& config,
51 ProofVerifier* proof_verifier);
51 52
52 ~QuicClientBase(); 53 ~QuicClientBase();
53 54
54 // Initializes the client to create a connection. Should be called exactly 55 // Initializes the client to create a connection. Should be called exactly
55 // once before calling StartConnect or Connect. Returns true if the 56 // once before calling StartConnect or Connect. Returns true if the
56 // initialization succeeds, false otherwise. 57 // initialization succeeds, false otherwise.
57 virtual bool Initialize(); 58 virtual bool Initialize();
58 59
59 // Returns true if the crypto handshake has yet to establish encryption. 60 // Returns true if the crypto handshake has yet to establish encryption.
60 // Returns false if encryption is active (even if the server hasn't confirmed 61 // Returns false if encryption is active (even if the server hasn't confirmed
(...skipping 21 matching lines...) Expand all
82 83
83 const QuicServerId& server_id() const { return server_id_; } 84 const QuicServerId& server_id() const { return server_id_; }
84 85
85 // This should only be set before the initial Connect() 86 // This should only be set before the initial Connect()
86 void set_server_id(const QuicServerId& server_id) { server_id_ = server_id; } 87 void set_server_id(const QuicServerId& server_id) { server_id_ = server_id; }
87 88
88 void SetUserAgentID(const std::string& user_agent_id) { 89 void SetUserAgentID(const std::string& user_agent_id) {
89 crypto_config_.set_user_agent_id(user_agent_id); 90 crypto_config_.set_user_agent_id(user_agent_id);
90 } 91 }
91 92
92 // SetProofVerifier sets the ProofVerifier that will be used to verify the 93 ProofVerifier* proof_verifier() const {
93 // server's certificate and takes ownership of |verifier|. 94 return crypto_config_.proof_verifier();
94 void SetProofVerifier(ProofVerifier* verifier) {
95 // TODO(rtenneti): We should set ProofVerifier in QuicClientSession.
96 crypto_config_.SetProofVerifier(verifier);
97 } 95 }
98 96
99 // SetChannelIDSource sets a ChannelIDSource that will be called, when the 97 // SetChannelIDSource sets a ChannelIDSource that will be called, when the
100 // server supports channel IDs, to obtain a channel ID for signing a message 98 // server supports channel IDs, to obtain a channel ID for signing a message
101 // proving possession of the channel ID. This object takes ownership of 99 // proving possession of the channel ID. This object takes ownership of
102 // |source|. 100 // |source|.
103 void SetChannelIDSource(ChannelIDSource* source) { 101 void SetChannelIDSource(ChannelIDSource* source) {
104 crypto_config_.SetChannelIDSource(source); 102 crypto_config_.SetChannelIDSource(source);
105 } 103 }
106 104
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // to the previous client-level connection. 230 // to the previous client-level connection.
233 bool connected_or_attempting_connect_; 231 bool connected_or_attempting_connect_;
234 232
235 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); 233 DISALLOW_COPY_AND_ASSIGN(QuicClientBase);
236 }; 234 };
237 235
238 } // namespace tools 236 } // namespace tools
239 } // namespace net 237 } // namespace net
240 238
241 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ 239 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698