| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | 5 #ifndef NET_QUIC_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| 6 #define NET_QUIC_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | 6 #define NET_QUIC_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 14 #include "net/quic/core/crypto/channel_id.h" | 14 #include "net/quic/core/crypto/channel_id.h" |
| 15 #include "net/quic/platform/api/quic_string_piece.h" |
| 15 | 16 |
| 16 namespace crypto { | 17 namespace crypto { |
| 17 class ECPrivateKey; | 18 class ECPrivateKey; |
| 18 } // namespace crypto | 19 } // namespace crypto |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| 21 | 22 |
| 22 class ChannelIDService; | 23 class ChannelIDService; |
| 23 | 24 |
| 24 class NET_EXPORT_PRIVATE ChannelIDKeyChromium : public ChannelIDKey { | 25 class NET_EXPORT_PRIVATE ChannelIDKeyChromium : public ChannelIDKey { |
| 25 public: | 26 public: |
| 26 explicit ChannelIDKeyChromium( | 27 explicit ChannelIDKeyChromium( |
| 27 std::unique_ptr<crypto::ECPrivateKey> ec_private_key); | 28 std::unique_ptr<crypto::ECPrivateKey> ec_private_key); |
| 28 ~ChannelIDKeyChromium() override; | 29 ~ChannelIDKeyChromium() override; |
| 29 | 30 |
| 30 // ChannelIDKey interface | 31 // ChannelIDKey interface |
| 31 bool Sign(base::StringPiece signed_data, | 32 bool Sign(QuicStringPiece signed_data, |
| 32 std::string* out_signature) const override; | 33 std::string* out_signature) const override; |
| 33 std::string SerializeKey() const override; | 34 std::string SerializeKey() const override; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 std::unique_ptr<crypto::ECPrivateKey> ec_private_key_; | 37 std::unique_ptr<crypto::ECPrivateKey> ec_private_key_; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 // ChannelIDSourceChromium implements the QUIC ChannelIDSource interface. | 40 // ChannelIDSourceChromium implements the QUIC ChannelIDSource interface. |
| 40 class ChannelIDSourceChromium : public ChannelIDSource { | 41 class ChannelIDSourceChromium : public ChannelIDSource { |
| 41 public: | 42 public: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 57 | 58 |
| 58 // The service for retrieving Channel ID keys. | 59 // The service for retrieving Channel ID keys. |
| 59 ChannelIDService* const channel_id_service_; | 60 ChannelIDService* const channel_id_service_; |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(ChannelIDSourceChromium); | 62 DISALLOW_COPY_AND_ASSIGN(ChannelIDSourceChromium); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace net | 65 } // namespace net |
| 65 | 66 |
| 66 #endif // NET_QUIC_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ | 67 #endif // NET_QUIC_CHROMIUM_CRYPTO_CHANNEL_ID_CHROMIUM_H_ |
| OLD | NEW |