From f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Sat, 1 Oct 2011 20:38:10 +0000 Subject: Begin CompletionCallback switchover. Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket_stream/socket_stream.h | 8 ++++---- net/socket_stream/socket_stream_unittest.cc | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'net/socket_stream') diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h index 9ce0074..03b1a18 100644 --- a/net/socket_stream/socket_stream.h +++ b/net/socket_stream/socket_stream.h @@ -63,7 +63,7 @@ class NET_EXPORT SocketStream virtual ~Delegate() {} virtual int OnStartOpenConnection(SocketStream* socket, - CompletionCallback* callback) { + OldCompletionCallback* callback) { return OK; } @@ -337,9 +337,9 @@ class NET_EXPORT SocketStream SSLConfig ssl_config_; - CompletionCallbackImpl io_callback_; - CompletionCallbackImpl read_callback_; - CompletionCallbackImpl write_callback_; + OldCompletionCallbackImpl io_callback_; + OldCompletionCallbackImpl read_callback_; + OldCompletionCallbackImpl write_callback_; scoped_refptr read_buf_; int read_buf_size_; diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc index 80bff3c..cbdd6ed 100644 --- a/net/socket_stream/socket_stream_unittest.cc +++ b/net/socket_stream/socket_stream_unittest.cc @@ -32,7 +32,7 @@ struct SocketStreamEvent { int num, const std::string& str, net::AuthChallengeInfo* auth_challenge_info, - net::CompletionCallback* callback, + net::OldCompletionCallback* callback, int error) : event_type(type), socket(socket_stream), number(num), data(str), auth_info(auth_challenge_info), error_code(error) {} @@ -47,7 +47,7 @@ struct SocketStreamEvent { class SocketStreamEventRecorder : public net::SocketStream::Delegate { public: - explicit SocketStreamEventRecorder(net::CompletionCallback* callback) + explicit SocketStreamEventRecorder(net::OldCompletionCallback* callback) : callback_(callback) {} virtual ~SocketStreamEventRecorder() {} @@ -79,7 +79,7 @@ class SocketStreamEventRecorder : public net::SocketStream::Delegate { } virtual int OnStartOpenConnection(net::SocketStream* socket, - net::CompletionCallback* callback) { + net::OldCompletionCallback* callback) { connection_callback_ = callback; events_.push_back( SocketStreamEvent(SocketStreamEvent::EVENT_START_OPEN_CONNECTION, @@ -170,8 +170,8 @@ class SocketStreamEventRecorder : public net::SocketStream::Delegate { base::Callback on_close_; base::Callback on_auth_required_; base::Callback on_error_; - net::CompletionCallback* callback_; - net::CompletionCallback* connection_callback_; + net::OldCompletionCallback* callback_; + net::OldCompletionCallback* connection_callback_; string16 username_; string16 password_; @@ -239,7 +239,7 @@ class SocketStreamTest : public PlatformTest { static const char kWebSocketHandshakeResponse[]; protected: - TestCompletionCallback io_callback_; + TestOldCompletionCallback io_callback_; private: std::string handshake_request_; @@ -272,7 +272,7 @@ const char SocketStreamTest::kWebSocketHandshakeResponse[] = "8jKS'y:G*Co,Wxa-"; TEST_F(SocketStreamTest, CloseFlushPendingWrite) { - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -368,7 +368,7 @@ TEST_F(SocketStreamTest, BasicAuthProxy) { data_writes2, arraysize(data_writes2)); mock_socket_factory.AddSocketDataProvider(&data2); - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -406,7 +406,7 @@ TEST_F(SocketStreamTest, BasicAuthProxy) { } TEST_F(SocketStreamTest, IOPending) { - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -474,7 +474,7 @@ TEST_F(SocketStreamTest, IOPending) { } TEST_F(SocketStreamTest, SwitchToSpdy) { - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -503,7 +503,7 @@ TEST_F(SocketStreamTest, SwitchToSpdy) { } TEST_F(SocketStreamTest, SwitchAfterPending) { - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -558,7 +558,7 @@ TEST_F(SocketStreamTest, SecureProxyConnectError) { SSLSocketDataProvider ssl(false, ERR_SSL_PROTOCOL_ERROR); mock_socket_factory.AddSSLSocketDataProvider(&ssl); - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); @@ -610,7 +610,7 @@ TEST_F(SocketStreamTest, SecureProxyConnect) { SSLSocketDataProvider ssl(false, OK); mock_socket_factory.AddSSLSocketDataProvider(&ssl); - TestCompletionCallback callback; + TestOldCompletionCallback callback; scoped_ptr delegate( new SocketStreamEventRecorder(&callback)); -- cgit v1.1