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

Unified Diff: net/websockets/websocket_throttle_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/url_request/view_cache_helper_unittest.cc ('k') | remoting/host/heartbeat_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_throttle_unittest.cc
diff --git a/net/websockets/websocket_throttle_unittest.cc b/net/websockets/websocket_throttle_unittest.cc
index c4bf59ffc5adf734a1145a13a1eb21270fbd5aa2..7eb18fa52567c8629120a5d2b5ce54ff50bf95f2 100644
--- a/net/websockets/websocket_throttle_unittest.cc
+++ b/net/websockets/websocket_throttle_unittest.cc
@@ -83,9 +83,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
struct addrinfo* addr = AddAddr(1, 2, 3, 4, NULL);
addr = AddAddr(1, 2, 3, 5, addr);
addr = AddAddr(1, 2, 3, 6, addr);
- scoped_refptr<WebSocketJob> w1 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s1 =
- new SocketStream(GURL("ws://host1/"), w1.get());
+ scoped_refptr<WebSocketJob> w1(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s1(
+ new SocketStream(GURL("ws://host1/"), w1.get()));
w1->InitSocketStream(s1.get());
WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
DeleteAddrInfo(addr);
@@ -103,9 +103,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// For host2: 1.2.3.4
addr = AddAddr(1, 2, 3, 4, NULL);
- scoped_refptr<WebSocketJob> w2 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s2 =
- new SocketStream(GURL("ws://host2/"), w2.get());
+ scoped_refptr<WebSocketJob> w2(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s2(
+ new SocketStream(GURL("ws://host2/"), w2.get()));
w2->InitSocketStream(s2.get());
WebSocketThrottleTest::MockSocketStreamConnect(s2, addr);
DeleteAddrInfo(addr);
@@ -122,9 +122,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// For host3: 1.2.3.5
addr = AddAddr(1, 2, 3, 5, NULL);
- scoped_refptr<WebSocketJob> w3 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s3 =
- new SocketStream(GURL("ws://host3/"), w3.get());
+ scoped_refptr<WebSocketJob> w3(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s3(
+ new SocketStream(GURL("ws://host3/"), w3.get()));
w3->InitSocketStream(s3.get());
WebSocketThrottleTest::MockSocketStreamConnect(s3, addr);
DeleteAddrInfo(addr);
@@ -141,9 +141,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// For host4: 1.2.3.4, 1.2.3.6
addr = AddAddr(1, 2, 3, 4, NULL);
addr = AddAddr(1, 2, 3, 6, addr);
- scoped_refptr<WebSocketJob> w4 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s4 =
- new SocketStream(GURL("ws://host4/"), w4.get());
+ scoped_refptr<WebSocketJob> w4(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s4(
+ new SocketStream(GURL("ws://host4/"), w4.get()));
w4->InitSocketStream(s4.get());
WebSocketThrottleTest::MockSocketStreamConnect(s4, addr);
DeleteAddrInfo(addr);
@@ -159,9 +159,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// For host5: 1.2.3.6
addr = AddAddr(1, 2, 3, 6, NULL);
- scoped_refptr<WebSocketJob> w5 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s5 =
- new SocketStream(GURL("ws://host5/"), w5.get());
+ scoped_refptr<WebSocketJob> w5(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s5(
+ new SocketStream(GURL("ws://host5/"), w5.get()));
w5->InitSocketStream(s5.get());
WebSocketThrottleTest::MockSocketStreamConnect(s5, addr);
DeleteAddrInfo(addr);
@@ -177,9 +177,9 @@ TEST_F(WebSocketThrottleTest, Throttle) {
// For host6: 1.2.3.6
addr = AddAddr(1, 2, 3, 6, NULL);
- scoped_refptr<WebSocketJob> w6 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s6 =
- new SocketStream(GURL("ws://host6/"), w6.get());
+ scoped_refptr<WebSocketJob> w6(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s6(
+ new SocketStream(GURL("ws://host6/"), w6.get()));
w6->InitSocketStream(s6.get());
WebSocketThrottleTest::MockSocketStreamConnect(s6, addr);
DeleteAddrInfo(addr);
@@ -286,9 +286,9 @@ TEST_F(WebSocketThrottleTest, NoThrottleForDuplicateAddress) {
// For localhost: 127.0.0.1, 127.0.0.1
struct addrinfo* addr = AddAddr(127, 0, 0, 1, NULL);
addr = AddAddr(127, 0, 0, 1, addr);
- scoped_refptr<WebSocketJob> w1 = new WebSocketJob(&delegate);
- scoped_refptr<SocketStream> s1 =
- new SocketStream(GURL("ws://localhost/"), w1.get());
+ scoped_refptr<WebSocketJob> w1(new WebSocketJob(&delegate));
+ scoped_refptr<SocketStream> s1(
+ new SocketStream(GURL("ws://localhost/"), w1.get()));
w1->InitSocketStream(s1.get());
WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
DeleteAddrInfo(addr);
« no previous file with comments | « net/url_request/view_cache_helper_unittest.cc ('k') | remoting/host/heartbeat_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698