OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_CRYPTO_CLIENT_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/quic/crypto/channel_id.h" | 10 #include "net/quic/crypto/channel_id.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // ProofVerifierCallbackImpl is passed as the callback method to VerifyProof. | 74 // ProofVerifierCallbackImpl is passed as the callback method to VerifyProof. |
75 // The ProofVerifier calls this class with the result of proof verification | 75 // The ProofVerifier calls this class with the result of proof verification |
76 // when verification is performed asynchronously. | 76 // when verification is performed asynchronously. |
77 class ProofVerifierCallbackImpl : public ProofVerifierCallback { | 77 class ProofVerifierCallbackImpl : public ProofVerifierCallback { |
78 public: | 78 public: |
79 explicit ProofVerifierCallbackImpl(QuicCryptoClientStream* stream); | 79 explicit ProofVerifierCallbackImpl(QuicCryptoClientStream* stream); |
80 ~ProofVerifierCallbackImpl() override; | 80 ~ProofVerifierCallbackImpl() override; |
81 | 81 |
82 // ProofVerifierCallback interface. | 82 // ProofVerifierCallback interface. |
83 void Run(bool ok, | 83 void Run(bool ok, |
84 const string& error_details, | 84 const std::string& error_details, |
85 scoped_ptr<ProofVerifyDetails>* details) override; | 85 scoped_ptr<ProofVerifyDetails>* details) override; |
86 | 86 |
87 // Cancel causes any future callbacks to be ignored. It must be called on | 87 // Cancel causes any future callbacks to be ignored. It must be called on |
88 // the same thread as the callback will be made on. | 88 // the same thread as the callback will be made on. |
89 void Cancel(); | 89 void Cancel(); |
90 | 90 |
91 private: | 91 private: |
92 QuicCryptoClientStream* stream_; | 92 QuicCryptoClientStream* stream_; |
93 }; | 93 }; |
94 | 94 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 scoped_ptr<ProofVerifyContext> verify_context_; | 201 scoped_ptr<ProofVerifyContext> verify_context_; |
202 | 202 |
203 // proof_verify_callback_ contains the callback object that we passed to an | 203 // proof_verify_callback_ contains the callback object that we passed to an |
204 // asynchronous proof verification. The ProofVerifier owns this object. | 204 // asynchronous proof verification. The ProofVerifier owns this object. |
205 ProofVerifierCallbackImpl* proof_verify_callback_; | 205 ProofVerifierCallbackImpl* proof_verify_callback_; |
206 | 206 |
207 // These members are used to store the result of an asynchronous proof | 207 // These members are used to store the result of an asynchronous proof |
208 // verification. These members must not be used after | 208 // verification. These members must not be used after |
209 // STATE_VERIFY_PROOF_COMPLETE. | 209 // STATE_VERIFY_PROOF_COMPLETE. |
210 bool verify_ok_; | 210 bool verify_ok_; |
211 string verify_error_details_; | 211 std::string verify_error_details_; |
212 scoped_ptr<ProofVerifyDetails> verify_details_; | 212 scoped_ptr<ProofVerifyDetails> verify_details_; |
213 | 213 |
214 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 214 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
215 }; | 215 }; |
216 | 216 |
217 } // namespace net | 217 } // namespace net |
218 | 218 |
219 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 219 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |