OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "net/socket/fuzzed_socket_factory.h" | 5 #include "net/socket/fuzzed_socket_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/test/fuzzed_data_provider.h" | 9 #include "base/test/fuzzed_data_provider.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 bool IsConnected() const override { return false; } | 55 bool IsConnected() const override { return false; } |
56 bool IsConnectedAndIdle() const override { return false; } | 56 bool IsConnectedAndIdle() const override { return false; } |
57 | 57 |
58 int GetPeerAddress(IPEndPoint* address) const override { | 58 int GetPeerAddress(IPEndPoint* address) const override { |
59 return ERR_SOCKET_NOT_CONNECTED; | 59 return ERR_SOCKET_NOT_CONNECTED; |
60 } | 60 } |
61 int GetLocalAddress(IPEndPoint* address) const override { | 61 int GetLocalAddress(IPEndPoint* address) const override { |
62 return ERR_SOCKET_NOT_CONNECTED; | 62 return ERR_SOCKET_NOT_CONNECTED; |
63 } | 63 } |
64 | 64 |
65 const BoundNetLog& NetLog() const override { return net_log_; } | 65 const NetLogWithSource& NetLog() const override { return net_log_; } |
66 | 66 |
67 void SetSubresourceSpeculation() override {} | 67 void SetSubresourceSpeculation() override {} |
68 void SetOmniboxSpeculation() override {} | 68 void SetOmniboxSpeculation() override {} |
69 | 69 |
70 bool WasEverUsed() const override { return false; } | 70 bool WasEverUsed() const override { return false; } |
71 | 71 |
72 void EnableTCPFastOpenIfSupported() override {} | 72 void EnableTCPFastOpenIfSupported() override {} |
73 | 73 |
74 bool WasNpnNegotiated() const override { return false; } | 74 bool WasNpnNegotiated() const override { return false; } |
75 | 75 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 NOTREACHED(); | 111 NOTREACHED(); |
112 return ERR_UNEXPECTED; | 112 return ERR_UNEXPECTED; |
113 } | 113 } |
114 | 114 |
115 crypto::ECPrivateKey* GetChannelIDKey() const override { | 115 crypto::ECPrivateKey* GetChannelIDKey() const override { |
116 NOTREACHED(); | 116 NOTREACHED(); |
117 return nullptr; | 117 return nullptr; |
118 } | 118 } |
119 | 119 |
120 private: | 120 private: |
121 BoundNetLog net_log_; | 121 NetLogWithSource net_log_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); | 123 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace | 126 } // namespace |
127 | 127 |
128 FuzzedSocketFactory::FuzzedSocketFactory( | 128 FuzzedSocketFactory::FuzzedSocketFactory( |
129 base::FuzzedDataProvider* data_provider) | 129 base::FuzzedDataProvider* data_provider) |
130 : data_provider_(data_provider) {} | 130 : data_provider_(data_provider) {} |
131 | 131 |
(...skipping 25 matching lines...) Expand all Loading... |
157 std::unique_ptr<ClientSocketHandle> transport_socket, | 157 std::unique_ptr<ClientSocketHandle> transport_socket, |
158 const HostPortPair& host_and_port, | 158 const HostPortPair& host_and_port, |
159 const SSLConfig& ssl_config, | 159 const SSLConfig& ssl_config, |
160 const SSLClientSocketContext& context) { | 160 const SSLClientSocketContext& context) { |
161 return base::MakeUnique<FailingSSLClientSocket>(); | 161 return base::MakeUnique<FailingSSLClientSocket>(); |
162 } | 162 } |
163 | 163 |
164 void FuzzedSocketFactory::ClearSSLSessionCache() {} | 164 void FuzzedSocketFactory::ClearSSLSessionCache() {} |
165 | 165 |
166 } // namespace net | 166 } // namespace net |
OLD | NEW |