summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
commitf1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch)
tree6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /net/socket_stream
parentd1666539b57bf8552e203d355fd09909d36f9732 (diff)
downloadchromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2
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
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.h8
-rw-r--r--net/socket_stream/socket_stream_unittest.cc26
2 files changed, 17 insertions, 17 deletions
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<SocketStream> io_callback_;
- CompletionCallbackImpl<SocketStream> read_callback_;
- CompletionCallbackImpl<SocketStream> write_callback_;
+ OldCompletionCallbackImpl<SocketStream> io_callback_;
+ OldCompletionCallbackImpl<SocketStream> read_callback_;
+ OldCompletionCallbackImpl<SocketStream> write_callback_;
scoped_refptr<IOBuffer> 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<void(SocketStreamEvent*)> on_close_;
base::Callback<void(SocketStreamEvent*)> on_auth_required_;
base::Callback<void(SocketStreamEvent*)> 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<SocketStreamEventRecorder> 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<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -406,7 +406,7 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
}
TEST_F(SocketStreamTest, IOPending) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -474,7 +474,7 @@ TEST_F(SocketStreamTest, IOPending) {
}
TEST_F(SocketStreamTest, SwitchToSpdy) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));
@@ -503,7 +503,7 @@ TEST_F(SocketStreamTest, SwitchToSpdy) {
}
TEST_F(SocketStreamTest, SwitchAfterPending) {
- TestCompletionCallback callback;
+ TestOldCompletionCallback callback;
scoped_ptr<SocketStreamEventRecorder> 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<SocketStreamEventRecorder> 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<SocketStreamEventRecorder> delegate(
new SocketStreamEventRecorder(&callback));