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

Unified Diff: net/websockets/websocket_job.cc

Issue 5634005: Add a new GetInstance() method for singleton classes under chrome/service and /net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
Index: net/websockets/websocket_job.cc
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index a1e2dde4513f504fa78b66581eede230e7546c69..9e3ad3c7ea2f95e783e4ee8035b8de49ea4983c1 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -144,8 +144,8 @@ void WebSocketJob::RestartWithAuth(
void WebSocketJob::DetachDelegate() {
state_ = CLOSED;
- Singleton<WebSocketThrottle>::get()->RemoveFromQueue(this);
- Singleton<WebSocketThrottle>::get()->WakeupSocketIfNecessary();
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(this);
+ WebSocketThrottle::GetInstance()->WakeupSocketIfNecessary();
scoped_refptr<WebSocketJob> protect(this);
@@ -165,7 +165,7 @@ int WebSocketJob::OnStartOpenConnection(
DCHECK(!callback_);
state_ = CONNECTING;
addresses_.Copy(socket->address_list().head(), true);
- Singleton<WebSocketThrottle>::get()->PutInQueue(this);
+ WebSocketThrottle::GetInstance()->PutInQueue(this);
if (!waiting_)
return OK;
callback_ = callback;
@@ -237,8 +237,8 @@ void WebSocketJob::OnReceivedData(
void WebSocketJob::OnClose(SocketStream* socket) {
state_ = CLOSED;
- Singleton<WebSocketThrottle>::get()->RemoveFromQueue(this);
- Singleton<WebSocketThrottle>::get()->WakeupSocketIfNecessary();
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(this);
+ WebSocketThrottle::GetInstance()->WakeupSocketIfNecessary();
scoped_refptr<WebSocketJob> protect(this);
@@ -405,8 +405,8 @@ void WebSocketJob::SaveNextCookie() {
handshake_response_.reset();
- Singleton<WebSocketThrottle>::get()->RemoveFromQueue(this);
- Singleton<WebSocketThrottle>::get()->WakeupSocketIfNecessary();
+ WebSocketThrottle::GetInstance()->RemoveFromQueue(this);
+ WebSocketThrottle::GetInstance()->WakeupSocketIfNecessary();
return;
}

Powered by Google App Engine
This is Rietveld 408576698