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

Side by Side Diff: net/spdy/chromium/multiplexed_session.h

Issue 2334943002: Add a new QuicChromiumClientSession::Handle class (Closed)
Patch Set: fixes Created 3 years, 7 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/spdy/chromium/multiplexed_http_stream.cc ('k') | net/spdy/chromium/multiplexed_session.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 #ifndef NET_SPDY_MULTIPLEXED_SESSION_H_ 5 #ifndef NET_SPDY_MULTIPLEXED_SESSION_H_
6 #define NET_SPDY_MULTIPLEXED_SESSION_H_ 6 #define NET_SPDY_MULTIPLEXED_SESSION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 27 matching lines...) Expand all
38 virtual Error GetTokenBindingSignature(crypto::ECPrivateKey* key, 38 virtual Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
39 TokenBindingType tb_type, 39 TokenBindingType tb_type,
40 std::vector<uint8_t>* out) = 0; 40 std::vector<uint8_t>* out) = 0;
41 }; 41 };
42 42
43 // A handle to a multiplexed session which will be valid even after the 43 // A handle to a multiplexed session which will be valid even after the
44 // underlying session is deleted. 44 // underlying session is deleted.
45 class NET_EXPORT_PRIVATE MultiplexedSessionHandle { 45 class NET_EXPORT_PRIVATE MultiplexedSessionHandle {
46 public: 46 public:
47 explicit MultiplexedSessionHandle(base::WeakPtr<MultiplexedSession> session); 47 explicit MultiplexedSessionHandle(base::WeakPtr<MultiplexedSession> session);
48 MultiplexedSessionHandle(const MultiplexedSessionHandle& other); 48 virtual ~MultiplexedSessionHandle();
49 MultiplexedSessionHandle(MultiplexedSessionHandle&& other);
50 ~MultiplexedSessionHandle();
51 49
52 // Gets the remote endpoint of the socket that the HTTP stream is using, if 50 // Gets the remote endpoint of the socket that the HTTP stream is using, if
53 // any. Returns true and fills in |endpoint| if it is available; returns false 51 // any. Returns true and fills in |endpoint| if it is available; returns false
54 // and does not modify |endpoint| if it is unavailable. 52 // and does not modify |endpoint| if it is unavailable.
55 bool GetRemoteEndpoint(IPEndPoint* endpoint); 53 bool GetRemoteEndpoint(IPEndPoint* endpoint);
56 54
57 // Fills SSL info in |ssl_info| and returns true when SSL is in use. 55 // Fills SSL info in |ssl_info| and returns true when SSL is in use.
58 bool GetSSLInfo(SSLInfo* ssl_info) const; 56 bool GetSSLInfo(SSLInfo* ssl_info) const;
59 57
60 // Caches SSL info from the underlying session. 58 // Caches SSL info from the underlying session.
61 void SaveSSLInfo(); 59 void SaveSSLInfo();
62 60
63 // Generates the signature used in Token Binding using key |*key| and for a 61 // Generates the signature used in Token Binding using key |*key| and for a
64 // Token Binding of type |tb_type|, putting the signature in |*out|. Returns a 62 // Token Binding of type |tb_type|, putting the signature in |*out|. Returns a
65 // net error code. 63 // net error code.
66 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, 64 Error GetTokenBindingSignature(crypto::ECPrivateKey* key,
67 TokenBindingType tb_type, 65 TokenBindingType tb_type,
68 std::vector<uint8_t>* out); 66 std::vector<uint8_t>* out);
69 67
70 private: 68 private:
71 base::WeakPtr<MultiplexedSession> session_; 69 base::WeakPtr<MultiplexedSession> session_;
72 SSLInfo ssl_info_; 70 SSLInfo ssl_info_;
73 bool has_ssl_info_; 71 bool has_ssl_info_;
74 }; 72 };
75 73
76 } // namespace net 74 } // namespace net
77 75
78 #endif // NET_SPDY_MULTIPLEXED_SESSION_H_ 76 #endif // NET_SPDY_MULTIPLEXED_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/chromium/multiplexed_http_stream.cc ('k') | net/spdy/chromium/multiplexed_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698