Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | |
| 6 #define NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | |
| 7 | |
| 8 #include <set> | |
| 9 | |
| 10 #include "net/quic/crypto/channel_id.h" | |
| 11 | |
| 12 namespace crypto { | |
| 13 class ECPrivateKey; | |
| 14 } // namespace crypto | |
| 15 | |
| 16 namespace net { | |
| 17 | |
| 18 class ServerBoundCertService; | |
| 19 | |
| 20 class NET_EXPORT_PRIVATE ChannelIDKeyChromium: public ChannelIDKey { | |
| 21 public: | |
| 22 explicit ChannelIDKeyChromium(crypto::ECPrivateKey* ec_private_key); | |
| 23 virtual ~ChannelIDKeyChromium(); | |
| 24 | |
| 25 // ChannelIDKey interface | |
| 26 virtual bool Sign(base::StringPiece signed_data, | |
| 27 std::string* out_signature) const OVERRIDE; | |
| 28 virtual std::string SerializeKey() const OVERRIDE; | |
|
ramant (doing other things)
2014/06/25 20:57:56
nit: consider adding #include <string>
wtc
2014/06/28 16:03:29
Thanks for the suggestion. <string> is already inc
| |
| 29 | |
| 30 private: | |
| 31 scoped_ptr<crypto::ECPrivateKey> ec_private_key_; | |
| 32 }; | |
| 33 | |
| 34 // ChannelIDSourceChromium implements the QUIC ChannelIDSource interface. | |
| 35 class ChannelIDSourceChromium : public ChannelIDSource { | |
| 36 public: | |
| 37 ChannelIDSourceChromium(ServerBoundCertService* server_bound_cert_service); | |
|
ramant (doing other things)
2014/06/25 20:57:56
nit: explicit on line 37 (single argument)..
wtc
2014/06/28 16:03:29
Done.
| |
| 38 virtual ~ChannelIDSourceChromium(); | |
| 39 | |
| 40 // ChannelIDSource interface | |
| 41 virtual QuicAsyncStatus GetChannelIDKey( | |
| 42 const std::string& hostname, | |
| 43 scoped_ptr<ChannelIDKey>* channel_id_key, | |
| 44 ChannelIDSourceCallback* callback) OVERRIDE; | |
| 45 | |
| 46 private: | |
| 47 class Job; | |
| 48 typedef std::set<Job*> JobSet; | |
| 49 | |
| 50 void OnJobComplete(Job* job); | |
| 51 | |
| 52 // Set owning pointers to active jobs. | |
| 53 JobSet active_jobs_; | |
| 54 | |
| 55 // The service for retrieving Channel ID keys. | |
| 56 ServerBoundCertService* const server_bound_cert_service_; | |
| 57 | |
| 58 DISALLOW_COPY_AND_ASSIGN(ChannelIDSourceChromium); | |
| 59 }; | |
| 60 | |
| 61 } // namespace net | |
| 62 | |
| 63 #endif // NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | |
| OLD | NEW |