OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_QUIC_CRYPTO_CHANNEL_ID_H_ | 5 #ifndef NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
6 #define NET_QUIC_CRYPTO_CHANNEL_ID_H_ | 6 #define NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 virtual std::string SerializeKey() const = 0; | 29 virtual std::string SerializeKey() const = 0; |
30 }; | 30 }; |
31 | 31 |
32 // ChannelIDSourceCallback provides a generic mechanism for a ChannelIDSource | 32 // ChannelIDSourceCallback provides a generic mechanism for a ChannelIDSource |
33 // to call back after an asynchronous GetChannelIDKey operation. | 33 // to call back after an asynchronous GetChannelIDKey operation. |
34 class ChannelIDSourceCallback { | 34 class ChannelIDSourceCallback { |
35 public: | 35 public: |
36 virtual ~ChannelIDSourceCallback() {} | 36 virtual ~ChannelIDSourceCallback() {} |
37 | 37 |
38 // Run is called on the original thread to mark the completion of an | 38 // Run is called on the original thread to mark the completion of an |
39 // asynchonous GetChannelIDKey operation. If |*channel_id_key| is not NULL | 39 // asynchonous GetChannelIDKey operation. If |*channel_id_key| is not nullptr |
40 // then the channel ID lookup is successful. |Run| may take ownership of | 40 // then the channel ID lookup is successful. |Run| may take ownership of |
41 // |*channel_id_key| by calling |release| on it. | 41 // |*channel_id_key| by calling |release| on it. |
42 virtual void Run(scoped_ptr<ChannelIDKey>* channel_id_key) = 0; | 42 virtual void Run(scoped_ptr<ChannelIDKey>* channel_id_key) = 0; |
43 }; | 43 }; |
44 | 44 |
45 // ChannelIDSource is an abstract interface by which a QUIC client can obtain | 45 // ChannelIDSource is an abstract interface by which a QUIC client can obtain |
46 // a ChannelIDKey for a given hostname. | 46 // a ChannelIDKey for a given hostname. |
47 class NET_EXPORT_PRIVATE ChannelIDSource { | 47 class NET_EXPORT_PRIVATE ChannelIDSource { |
48 public: | 48 public: |
49 virtual ~ChannelIDSource() {} | 49 virtual ~ChannelIDSource() {} |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 base::StringPiece signature, | 89 base::StringPiece signature, |
90 bool is_channel_id_signature); | 90 bool is_channel_id_signature); |
91 | 91 |
92 private: | 92 private: |
93 DISALLOW_COPY_AND_ASSIGN(ChannelIDVerifier); | 93 DISALLOW_COPY_AND_ASSIGN(ChannelIDVerifier); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace net | 96 } // namespace net |
97 | 97 |
98 #endif // NET_QUIC_CRYPTO_CHANNEL_ID_H_ | 98 #endif // NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
OLD | NEW |