| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 NOTREACHED(); | 110 NOTREACHED(); |
| 111 return ERR_UNEXPECTED; | 111 return ERR_UNEXPECTED; |
| 112 } | 112 } |
| 113 | 113 |
| 114 crypto::ECPrivateKey* GetChannelIDKey() const override { | 114 crypto::ECPrivateKey* GetChannelIDKey() const override { |
| 115 NOTREACHED(); | 115 NOTREACHED(); |
| 116 return nullptr; | 116 return nullptr; |
| 117 } | 117 } |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 BoundNetLog net_log_; | 120 NetLogWithSource net_log_; |
| 121 | 121 |
| 122 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); | 122 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace | 125 } // namespace |
| 126 | 126 |
| 127 FuzzedSocketFactory::FuzzedSocketFactory( | 127 FuzzedSocketFactory::FuzzedSocketFactory( |
| 128 base::FuzzedDataProvider* data_provider) | 128 base::FuzzedDataProvider* data_provider) |
| 129 : data_provider_(data_provider) {} | 129 : data_provider_(data_provider) {} |
| 130 | 130 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 156 std::unique_ptr<ClientSocketHandle> transport_socket, | 156 std::unique_ptr<ClientSocketHandle> transport_socket, |
| 157 const HostPortPair& host_and_port, | 157 const HostPortPair& host_and_port, |
| 158 const SSLConfig& ssl_config, | 158 const SSLConfig& ssl_config, |
| 159 const SSLClientSocketContext& context) { | 159 const SSLClientSocketContext& context) { |
| 160 return base::MakeUnique<FailingSSLClientSocket>(); | 160 return base::MakeUnique<FailingSSLClientSocket>(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void FuzzedSocketFactory::ClearSSLSessionCache() {} | 163 void FuzzedSocketFactory::ClearSSLSessionCache() {} |
| 164 | 164 |
| 165 } // namespace net | 165 } // namespace net |
| OLD | NEW |