Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: net/socket/fuzzed_socket_factory.cc

Issue 2250263003: Move FuzzedDataProvider to //base and expose to blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... also remove PLATFORM_EXPORT Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/fuzzed_socket_factory.h ('k') | net/socket/socks5_client_socket_fuzzer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/base/address_list.h" 10 #include "net/base/address_list.h"
10 #include "net/base/ip_endpoint.h" 11 #include "net/base/ip_endpoint.h"
11 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
12 #include "net/base/network_change_notifier.h" 13 #include "net/base/network_change_notifier.h"
13 #include "net/log/net_log.h" 14 #include "net/log/net_log.h"
14 #include "net/socket/client_socket_handle.h" 15 #include "net/socket/client_socket_handle.h"
15 #include "net/socket/connection_attempts.h" 16 #include "net/socket/connection_attempts.h"
16 #include "net/socket/fuzzed_socket.h" 17 #include "net/socket/fuzzed_socket.h"
17 #include "net/socket/ssl_client_socket.h" 18 #include "net/socket/ssl_client_socket.h"
18 #include "net/udp/fuzzed_datagram_client_socket.h" 19 #include "net/udp/fuzzed_datagram_client_socket.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 117 }
117 118
118 private: 119 private:
119 BoundNetLog net_log_; 120 BoundNetLog net_log_;
120 121
121 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket); 122 DISALLOW_COPY_AND_ASSIGN(FailingSSLClientSocket);
122 }; 123 };
123 124
124 } // namespace 125 } // namespace
125 126
126 FuzzedSocketFactory::FuzzedSocketFactory(FuzzedDataProvider* data_provider) 127 FuzzedSocketFactory::FuzzedSocketFactory(
128 base::FuzzedDataProvider* data_provider)
127 : data_provider_(data_provider) {} 129 : data_provider_(data_provider) {}
128 130
129 FuzzedSocketFactory::~FuzzedSocketFactory() {} 131 FuzzedSocketFactory::~FuzzedSocketFactory() {}
130 132
131 std::unique_ptr<DatagramClientSocket> 133 std::unique_ptr<DatagramClientSocket>
132 FuzzedSocketFactory::CreateDatagramClientSocket( 134 FuzzedSocketFactory::CreateDatagramClientSocket(
133 DatagramSocket::BindType bind_type, 135 DatagramSocket::BindType bind_type,
134 const RandIntCallback& rand_int_cb, 136 const RandIntCallback& rand_int_cb,
135 NetLog* net_log, 137 NetLog* net_log,
136 const NetLog::Source& source) { 138 const NetLog::Source& source) {
(...skipping 17 matching lines...) Expand all
154 std::unique_ptr<ClientSocketHandle> transport_socket, 156 std::unique_ptr<ClientSocketHandle> transport_socket,
155 const HostPortPair& host_and_port, 157 const HostPortPair& host_and_port,
156 const SSLConfig& ssl_config, 158 const SSLConfig& ssl_config,
157 const SSLClientSocketContext& context) { 159 const SSLClientSocketContext& context) {
158 return base::WrapUnique(new FailingSSLClientSocket()); 160 return base::WrapUnique(new FailingSSLClientSocket());
159 } 161 }
160 162
161 void FuzzedSocketFactory::ClearSSLSessionCache() {} 163 void FuzzedSocketFactory::ClearSSLSessionCache() {}
162 164
163 } // namespace net 165 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/fuzzed_socket_factory.h ('k') | net/socket/socks5_client_socket_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698