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

Unified Diff: net/websockets/websocket_job_spdy2_unittest.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 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/websockets/websocket_job.cc ('k') | net/websockets/websocket_job_spdy3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job_spdy2_unittest.cc
diff --git a/net/websockets/websocket_job_spdy2_unittest.cc b/net/websockets/websocket_job_spdy2_unittest.cc
index f1ed00d52cc6453c3339deb240129bab7597b6a4..a68e787364b84210c1ce2d58e5825c089a3e6a05 100644
--- a/net/websockets/websocket_job_spdy2_unittest.cc
+++ b/net/websockets/websocket_job_spdy2_unittest.cc
@@ -392,7 +392,7 @@ class WebSocketJobSpdy2Test : public PlatformTest {
}
ssl_config_service_ = new MockSSLConfigService();
- context_->set_ssl_config_service(ssl_config_service_);
+ context_->set_ssl_config_service(ssl_config_service_.get());
proxy_service_.reset(net::ProxyService::CreateDirect());
context_->set_proxy_service(proxy_service_.get());
host_resolver_.reset(new net::MockHostResolver);
@@ -413,15 +413,15 @@ class WebSocketJobSpdy2Test : public PlatformTest {
}
void SkipToConnecting() {
websocket_->state_ = WebSocketJob::CONNECTING;
- WebSocketThrottle::GetInstance()->PutInQueue(websocket_);
+ WebSocketThrottle::GetInstance()->PutInQueue(websocket_.get());
}
WebSocketJob::State GetWebSocketJobState() {
return websocket_->state_;
}
void CloseWebSocketJob() {
- if (websocket_->socket_) {
+ if (websocket_->socket_.get()) {
websocket_->socket_->DetachDelegate();
- WebSocketThrottle::GetInstance()->RemoveFromQueue(websocket_);
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(websocket_.get());
}
websocket_->state_ = WebSocketJob::CLOSED;
websocket_->delegate_ = NULL;
@@ -617,7 +617,7 @@ void WebSocketJobSpdy2Test::TestSlowHandshake() {
for (size_t i = 0; i < lines.size() - 2; i++) {
std::string line = lines[i] + "\r\n";
SCOPED_TRACE("Line: " + line);
- websocket_->OnReceivedData(socket_,
+ websocket_->OnReceivedData(socket_.get(),
line.c_str(),
line.size());
MessageLoop::current()->RunAllPending();
@@ -638,7 +638,7 @@ TEST_F(WebSocketJobSpdy2Test, DelayedCookies) {
GURL cookieUrl("http://example.com/demo");
CookieOptions cookie_options;
scoped_refptr<DelayedCookieMonster> cookie_store = new DelayedCookieMonster();
- context_->set_cookie_store(cookie_store);
+ context_->set_cookie_store(cookie_store.get());
cookie_store->SetCookieWithOptionsAsync(
cookieUrl, "CR-test=1", cookie_options,
net::CookieMonster::SetCookiesCallback());
@@ -657,7 +657,7 @@ TEST_F(WebSocketJobSpdy2Test, DelayedCookies) {
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kHandshakeRequestWithFilteredCookie, sent_data());
EXPECT_EQ(WebSocketJob::CONNECTING, GetWebSocketJobState());
- websocket_->OnSentData(socket_,
+ websocket_->OnSentData(socket_.get(),
kHandshakeRequestWithFilteredCookieLength);
EXPECT_EQ(kHandshakeRequestWithCookieLength,
delegate.amount_sent());
@@ -692,7 +692,7 @@ void WebSocketJobSpdy2Test::TestHandshakeWithCookie() {
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kHandshakeRequestWithFilteredCookie, sent_data());
EXPECT_EQ(WebSocketJob::CONNECTING, GetWebSocketJobState());
- websocket_->OnSentData(socket_,
+ websocket_->OnSentData(socket_.get(),
kHandshakeRequestWithFilteredCookieLength);
EXPECT_EQ(kHandshakeRequestWithCookieLength,
delegate.amount_sent());
@@ -736,7 +736,7 @@ void WebSocketJobSpdy2Test::TestHandshakeWithCookieButNotAllowed() {
MessageLoop::current()->RunAllPending();
EXPECT_EQ(kHandshakeRequestWithoutCookie, sent_data());
EXPECT_EQ(WebSocketJob::CONNECTING, GetWebSocketJobState());
- websocket_->OnSentData(socket_, kHandshakeRequestWithoutCookieLength);
+ websocket_->OnSentData(socket_.get(), kHandshakeRequestWithoutCookieLength);
EXPECT_EQ(kHandshakeRequestWithCookieLength,
delegate.amount_sent());
@@ -866,7 +866,7 @@ void WebSocketJobSpdy2Test::TestConnectByWebSocket(
// Remove the former WebSocket object from throttling queue to unblock the
// latter.
- WebSocketThrottle::GetInstance()->RemoveFromQueue(block_websocket);
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(block_websocket.get());
block_websocket->state_ = WebSocketJob::CLOSED;
block_websocket = NULL;
WebSocketThrottle::GetInstance()->WakeupSocketIfNecessary();
@@ -982,7 +982,7 @@ void WebSocketJobSpdy2Test::TestConnectBySpdy(
// Remove the former WebSocket object from throttling queue to unblock the
// latter.
- WebSocketThrottle::GetInstance()->RemoveFromQueue(block_websocket);
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(block_websocket.get());
block_websocket->state_ = WebSocketJob::CLOSED;
block_websocket = NULL;
WebSocketThrottle::GetInstance()->WakeupSocketIfNecessary();
« no previous file with comments | « net/websockets/websocket_job.cc ('k') | net/websockets/websocket_job_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698