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

Unified Diff: net/socket/socket_test_util.h

Issue 3417010: Integrate the SpdyProxyClientSocket into the HttpStreamRequest... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebasing again Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/socket_test_util.h
===================================================================
--- net/socket/socket_test_util.h (revision 62460)
+++ net/socket/socket_test_util.h (working copy)
@@ -92,6 +92,11 @@
result(0), data(data), data_len(data_len), sequence_number(0),
time_stamp(base::Time::Now()) { }
+ // Read success (inferred data length) with sequence information.
+ MockRead(bool async, int seq, const char* data) : async(async),
+ result(0), data(data), data_len(strlen(data)), sequence_number(seq),
+ time_stamp(base::Time::Now()) { }
+
// Read success with sequence information.
MockRead(bool async, const char* data, int data_len, int seq) : async(async),
result(0), data(data), data_len(data_len), sequence_number(seq),
@@ -923,62 +928,6 @@
extern const char kSOCKS5OkResponse[];
extern const int kSOCKS5OkResponseLength;
-class MockSSLClientSocketPool : public SSLClientSocketPool {
- public:
- class MockConnectJob {
- public:
- MockConnectJob(ClientSocket* socket, ClientSocketHandle* handle,
- CompletionCallback* callback);
-
- int Connect();
- bool CancelHandle(const ClientSocketHandle* handle);
-
- private:
- void OnConnect(int rv);
-
- scoped_ptr<ClientSocket> socket_;
- ClientSocketHandle* handle_;
- CompletionCallback* user_callback_;
- CompletionCallbackImpl<MockConnectJob> connect_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MockConnectJob);
- };
-
- MockSSLClientSocketPool(
- int max_sockets,
- int max_sockets_per_group,
- ClientSocketPoolHistograms* histograms,
- ClientSocketFactory* socket_factory,
- TCPClientSocketPool* tcp_pool);
-
- virtual ~MockSSLClientSocketPool();
-
- int release_count() const { return release_count_; }
- int cancel_count() const { return cancel_count_; }
-
- // SSLClientSocketPool methods.
- virtual int RequestSocket(const std::string& group_name,
- const void* socket_params,
- RequestPriority priority,
- ClientSocketHandle* handle,
- CompletionCallback* callback,
- const BoundNetLog& net_log);
-
- virtual void CancelRequest(const std::string& group_name,
- ClientSocketHandle* handle);
- virtual void ReleaseSocket(const std::string& group_name,
- ClientSocket* socket, int id);
-
- private:
- ClientSocketFactory* client_socket_factory_;
- int release_count_;
- int cancel_count_;
- ScopedVector<MockConnectJob> job_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocketPool);
-};
-
-
} // namespace net
#endif // NET_SOCKET_SOCKET_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698