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_SOCKET_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 int ExportKeyingMaterial(const base::StringPiece& label, | 581 int ExportKeyingMaterial(const base::StringPiece& label, |
582 bool has_context, | 582 bool has_context, |
583 const base::StringPiece& context, | 583 const base::StringPiece& context, |
584 unsigned char* out, | 584 unsigned char* out, |
585 unsigned int outlen) override; | 585 unsigned int outlen) override; |
586 NextProtoStatus GetNextProto(std::string* proto) const override; | 586 NextProtoStatus GetNextProto(std::string* proto) const override; |
587 ChannelIDService* GetChannelIDService() const override; | 587 ChannelIDService* GetChannelIDService() const override; |
588 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 588 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
589 std::vector<uint8_t>* out) override; | 589 std::vector<uint8_t>* out) override; |
590 crypto::ECPrivateKey* GetChannelIDKey() const override; | 590 crypto::ECPrivateKey* GetChannelIDKey() const override; |
591 SSLFailureState GetSSLFailureState() const override; | |
592 | 591 |
593 protected: | 592 protected: |
594 ~MockClientSocket() override; | 593 ~MockClientSocket() override; |
595 void RunCallbackAsync(const CompletionCallback& callback, int result); | 594 void RunCallbackAsync(const CompletionCallback& callback, int result); |
596 void RunCallback(const CompletionCallback& callback, int result); | 595 void RunCallback(const CompletionCallback& callback, int result); |
597 | 596 |
598 // True if Connect completed successfully and Disconnect hasn't been called. | 597 // True if Connect completed successfully and Disconnect hasn't been called. |
599 bool connected_; | 598 bool connected_; |
600 | 599 |
601 // Address of the "remote" peer we're connected to. | 600 // Address of the "remote" peer we're connected to. |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 | 1007 |
1009 // Helper function to get the total data size of the MockReads in |reads|. | 1008 // Helper function to get the total data size of the MockReads in |reads|. |
1010 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); | 1009 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
1011 | 1010 |
1012 // Helper function to get the total data size of the MockWrites in |writes|. | 1011 // Helper function to get the total data size of the MockWrites in |writes|. |
1013 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); | 1012 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
1014 | 1013 |
1015 } // namespace net | 1014 } // namespace net |
1016 | 1015 |
1017 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1016 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |