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

Unified Diff: net/socket/tcp_client_socket_pool_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit 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
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_pool_unittest.cc
diff --git a/net/socket/tcp_client_socket_pool_unittest.cc b/net/socket/tcp_client_socket_pool_unittest.cc
index ffb530b1a7f17571e579dd09505b4fadab626862..1a4ca02065f5421e66f1bf85721b8ad1477a1a99 100644
--- a/net/socket/tcp_client_socket_pool_unittest.cc
+++ b/net/socket/tcp_client_socket_pool_unittest.cc
@@ -297,8 +297,8 @@ class TCPClientSocketPoolTest : public testing::Test {
}
int StartRequest(const std::string& group_name, RequestPriority priority) {
- scoped_refptr<TCPSocketParams> params = new TCPSocketParams(
- HostPortPair("www.google.com", 80), MEDIUM, GURL(), false);
+ scoped_refptr<TCPSocketParams> params(new TCPSocketParams(
+ HostPortPair("www.google.com", 80), MEDIUM, GURL(), false));
return test_base_.StartRequestUsingPool(
&pool_, group_name, priority, params);
}
@@ -346,8 +346,8 @@ TEST_F(TCPClientSocketPoolTest, InitHostResolutionFailure) {
host_resolver_->rules()->AddSimulatedFailure("unresolvable.host.name");
TestCompletionCallback callback;
ClientSocketHandle handle;
- scoped_refptr<TCPSocketParams> dest = new TCPSocketParams(
- "unresolvable.host.name", 80, kDefaultPriority, GURL(), false);
+ scoped_refptr<TCPSocketParams> dest(new TCPSocketParams(
+ "unresolvable.host.name", 80, kDefaultPriority, GURL(), false));
EXPECT_EQ(ERR_IO_PENDING,
handle.Init("a", dest, kDefaultPriority, &callback, &pool_,
BoundNetLog()));
@@ -605,8 +605,8 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
MessageLoop::current()->RunAllPending();
}
within_callback_ = true;
- scoped_refptr<TCPSocketParams> dest = new TCPSocketParams(
- HostPortPair("www.google.com", 80), LOWEST, GURL(), false);
+ scoped_refptr<TCPSocketParams> dest(new TCPSocketParams(
+ HostPortPair("www.google.com", 80), LOWEST, GURL(), false));
int rv = handle_->Init("a", dest, LOWEST, this, pool_, BoundNetLog());
EXPECT_EQ(OK, rv);
}
@@ -626,8 +626,8 @@ class RequestSocketCallback : public CallbackRunner< Tuple1<int> > {
TEST_F(TCPClientSocketPoolTest, RequestTwice) {
ClientSocketHandle handle;
RequestSocketCallback callback(&handle, &pool_);
- scoped_refptr<TCPSocketParams> dest = new TCPSocketParams(
- HostPortPair("www.google.com", 80), LOWEST, GURL(), false);
+ scoped_refptr<TCPSocketParams> dest(new TCPSocketParams(
+ HostPortPair("www.google.com", 80), LOWEST, GURL(), false));
int rv = handle.Init("a", dest, LOWEST, &callback, &pool_,
BoundNetLog());
ASSERT_EQ(ERR_IO_PENDING, rv);
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698