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

Unified Diff: net/websockets/websocket_job_spdy3_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_spdy2_unittest.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job_spdy3_unittest.cc
diff --git a/net/websockets/websocket_job_spdy3_unittest.cc b/net/websockets/websocket_job_spdy3_unittest.cc
index b758252059bcf13988fe3a6985fdbb6e9606321a..fb6694db0e7139a573f33bfe4fea0453070f90c6 100644
--- a/net/websockets/websocket_job_spdy3_unittest.cc
+++ b/net/websockets/websocket_job_spdy3_unittest.cc
@@ -391,7 +391,7 @@ class WebSocketJobSpdy3Test : 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);
@@ -412,15 +412,15 @@ class WebSocketJobSpdy3Test : 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;
@@ -616,7 +616,7 @@ void WebSocketJobSpdy3Test::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();
@@ -637,7 +637,7 @@ TEST_F(WebSocketJobSpdy3Test, 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());
@@ -656,7 +656,7 @@ TEST_F(WebSocketJobSpdy3Test, 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());
@@ -691,7 +691,7 @@ void WebSocketJobSpdy3Test::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());
@@ -735,7 +735,7 @@ void WebSocketJobSpdy3Test::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());
@@ -865,7 +865,7 @@ void WebSocketJobSpdy3Test::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();
@@ -981,7 +981,7 @@ void WebSocketJobSpdy3Test::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_spdy2_unittest.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698