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

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

Issue 2686673003: Initial fuzzer for SpdySession (Closed)
Patch Set: Apply review feedback Created 3 years, 10 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
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 #ifndef NET_SOCKET_FUZZED_SOCKET_FACTORY_H_ 5 #ifndef NET_SOCKET_FUZZED_SOCKET_FACTORY_H_
6 #define NET_SOCKET_FUZZED_SOCKET_FACTORY_H_ 6 #define NET_SOCKET_FUZZED_SOCKET_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const NetLogSource& source) override; 48 const NetLogSource& source) override;
49 49
50 std::unique_ptr<SSLClientSocket> CreateSSLClientSocket( 50 std::unique_ptr<SSLClientSocket> CreateSSLClientSocket(
51 std::unique_ptr<ClientSocketHandle> transport_socket, 51 std::unique_ptr<ClientSocketHandle> transport_socket,
52 const HostPortPair& host_and_port, 52 const HostPortPair& host_and_port,
53 const SSLConfig& ssl_config, 53 const SSLConfig& ssl_config,
54 const SSLClientSocketContext& context) override; 54 const SSLClientSocketContext& context) override;
55 55
56 void ClearSSLSessionCache() override; 56 void ClearSSLSessionCache() override;
57 57
58 // Sets whether Connect()ions on returned sockets can be asynchronously
59 // delayed or outright fail. Defaults to true.
60 void set_fuzz_connect_result(bool v) { fuzz_connect_result_ = v; }
61
58 private: 62 private:
59 base::FuzzedDataProvider* data_provider_; 63 base::FuzzedDataProvider* data_provider_;
64 bool fuzz_connect_result_;
60 65
61 DISALLOW_COPY_AND_ASSIGN(FuzzedSocketFactory); 66 DISALLOW_COPY_AND_ASSIGN(FuzzedSocketFactory);
62 }; 67 };
63 68
64 } // namespace net 69 } // namespace net
65 70
66 #endif // NET_SOCKET_FUZZED_SOCKET_FACTORY_H_ 71 #endif // NET_SOCKET_FUZZED_SOCKET_FACTORY_H_
OLDNEW
« no previous file with comments | « net/data/fuzzer_dictionaries/net_spdy_session_fuzzer.dict ('k') | net/socket/fuzzed_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698