Chromium Code Reviews| Index: net/quic/crypto/channel_id_chromium.h |
| =================================================================== |
| --- net/quic/crypto/channel_id_chromium.h (revision 0) |
| +++ net/quic/crypto/channel_id_chromium.h (revision 0) |
| @@ -0,0 +1,63 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| +#define NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| + |
| +#include <set> |
| + |
| +#include "net/quic/crypto/channel_id.h" |
| + |
| +namespace crypto { |
| +class ECPrivateKey; |
| +} // namespace crypto |
| + |
| +namespace net { |
| + |
| +class ServerBoundCertService; |
| + |
| +class NET_EXPORT_PRIVATE ChannelIDKeyChromium: public ChannelIDKey { |
| + public: |
| + explicit ChannelIDKeyChromium(crypto::ECPrivateKey* ec_private_key); |
| + virtual ~ChannelIDKeyChromium(); |
| + |
| + // ChannelIDKey interface |
| + virtual bool Sign(base::StringPiece signed_data, |
| + std::string* out_signature) const OVERRIDE; |
| + 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
|
| + |
| + private: |
| + scoped_ptr<crypto::ECPrivateKey> ec_private_key_; |
| +}; |
| + |
| +// ChannelIDSourceChromium implements the QUIC ChannelIDSource interface. |
| +class ChannelIDSourceChromium : public ChannelIDSource { |
| + public: |
| + 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.
|
| + virtual ~ChannelIDSourceChromium(); |
| + |
| + // ChannelIDSource interface |
| + virtual QuicAsyncStatus GetChannelIDKey( |
| + const std::string& hostname, |
| + scoped_ptr<ChannelIDKey>* channel_id_key, |
| + ChannelIDSourceCallback* callback) OVERRIDE; |
| + |
| + private: |
| + class Job; |
| + typedef std::set<Job*> JobSet; |
| + |
| + void OnJobComplete(Job* job); |
| + |
| + // Set owning pointers to active jobs. |
| + JobSet active_jobs_; |
| + |
| + // The service for retrieving Channel ID keys. |
| + ServerBoundCertService* const server_bound_cert_service_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ChannelIDSourceChromium); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_QUIC_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| Property changes on: net/quic/crypto/channel_id_chromium.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |