| Index: net/socket/socket_test_util.h
|
| diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
|
| index d6c7abafd980ffe828ae75cc6009da2f2adf716d..ef15a845ee95cc36a7e5cdfe99c783767767a72b 100644
|
| --- a/net/socket/socket_test_util.h
|
| +++ b/net/socket/socket_test_util.h
|
| @@ -336,12 +336,6 @@ struct SSLSocketDataProvider {
|
| bool channel_id_sent;
|
| ChannelIDService* channel_id_service;
|
| int connection_status;
|
| - // Indicates that the socket should pause in the Connect method.
|
| - bool should_pause_on_connect;
|
| - // Whether or not the Socket should behave like there is a pre-existing
|
| - // session to resume. Whether or not such a session is reported as
|
| - // resumed is controlled by |connection_status|.
|
| - bool is_in_session_cache;
|
| };
|
|
|
| // A DataProvider where the client must write a request before the reads (e.g.
|
| @@ -645,12 +639,6 @@ class MockClientSocketFactory : public ClientSocketFactory {
|
| return mock_data_;
|
| }
|
|
|
| - // Note: this method is unsafe; the elements of the returned vector
|
| - // are not necessarily valid.
|
| - const std::vector<MockSSLClientSocket*>& ssl_client_sockets() const {
|
| - return ssl_client_sockets_;
|
| - }
|
| -
|
| // ClientSocketFactory
|
| scoped_ptr<DatagramClientSocket> CreateDatagramClientSocket(
|
| DatagramSocket::BindType bind_type,
|
| @@ -671,7 +659,6 @@ class MockClientSocketFactory : public ClientSocketFactory {
|
| private:
|
| SocketDataProviderArray<SocketDataProvider> mock_data_;
|
| SocketDataProviderArray<SSLSocketDataProvider> mock_ssl_data_;
|
| - std::vector<MockSSLClientSocket*> ssl_client_sockets_;
|
| };
|
|
|
| class MockClientSocket : public SSLClientSocket {
|
| @@ -705,9 +692,6 @@ class MockClientSocket : public SSLClientSocket {
|
| void SetOmniboxSpeculation() override {}
|
|
|
| // SSLClientSocket implementation.
|
| - std::string GetSessionCacheKey() const override;
|
| - bool InSessionCache() const override;
|
| - void SetHandshakeCompletionCallback(const base::Closure& cb) override;
|
| void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
|
| int ExportKeyingMaterial(const base::StringPiece& label,
|
| bool has_context,
|
| @@ -966,9 +950,6 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
|
| bool GetSSLInfo(SSLInfo* ssl_info) override;
|
|
|
| // SSLClientSocket implementation.
|
| - std::string GetSessionCacheKey() const override;
|
| - bool InSessionCache() const override;
|
| - void SetHandshakeCompletionCallback(const base::Closure& cb) override;
|
| void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
|
| NextProtoStatus GetNextProto(std::string* proto) override;
|
| bool set_was_npn_negotiated(bool negotiated) override;
|
| @@ -983,45 +964,18 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
|
| void set_channel_id_sent(bool channel_id_sent) override;
|
| ChannelIDService* GetChannelIDService() const override;
|
|
|
| - bool reached_connect() const { return reached_connect_; }
|
| -
|
| - // Resumes the connection of a socket that was paused for testing.
|
| - // |connect_callback_| should be set before invoking this method.
|
| - void RestartPausedConnect();
|
| -
|
| private:
|
| - enum ConnectState {
|
| - STATE_NONE,
|
| - STATE_SSL_CONNECT,
|
| - STATE_SSL_CONNECT_COMPLETE,
|
| - };
|
| -
|
| - void OnIOComplete(int result);
|
| -
|
| - // Runs the state transistion loop.
|
| - int DoConnectLoop(int result);
|
| -
|
| - int DoSSLConnect();
|
| - int DoSSLConnectComplete(int result);
|
| + static void ConnectCallback(MockSSLClientSocket* ssl_client_socket,
|
| + const CompletionCallback& callback,
|
| + int rv);
|
|
|
| scoped_ptr<ClientSocketHandle> transport_;
|
| - HostPortPair host_port_pair_;
|
| SSLSocketDataProvider* data_;
|
| bool is_npn_state_set_;
|
| bool new_npn_value_;
|
| bool is_protocol_negotiated_set_;
|
| NextProto protocol_negotiated_;
|
|
|
| - CompletionCallback connect_callback_;
|
| - // Indicates what state of Connect the socket should enter.
|
| - ConnectState next_connect_state_;
|
| - // True if the Connect method has been called on the socket.
|
| - bool reached_connect_;
|
| -
|
| - base::Closure handshake_completion_callback_;
|
| -
|
| - base::WeakPtrFactory<MockSSLClientSocket> weak_factory_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket);
|
| };
|
|
|
|
|