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

Unified Diff: chrome/browser/debugger/devtools_protocol_handler.cc

Issue 2868036: Brushed up listen socket: (Closed)
Patch Set: Lint. Created 10 years, 5 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 | « chrome/browser/debugger/devtools_protocol_handler.h ('k') | chrome/browser/debugger/devtools_remote.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_protocol_handler.cc
diff --git a/chrome/browser/debugger/devtools_protocol_handler.cc b/chrome/browser/debugger/devtools_protocol_handler.cc
index d88aad0e26f2f8d3c797fd6f6852d215c978c8ea..4a73efa94d92515a849a1aca956a989a13c029c6 100644
--- a/chrome/browser/debugger/devtools_protocol_handler.cc
+++ b/chrome/browser/debugger/devtools_protocol_handler.cc
@@ -32,7 +32,7 @@ void DevToolsProtocolHandler::Start() {
void DevToolsProtocolHandler::Init() {
server_ = DevToolsRemoteListenSocket::Listen(
- "127.0.0.1", port_, this, this);
+ "127.0.0.1", port_, this);
}
void DevToolsProtocolHandler::Stop() {
@@ -85,26 +85,14 @@ void DevToolsProtocolHandler::Send(const DevToolsRemoteMessage& message) {
}
}
-void DevToolsProtocolHandler::DidAccept(ListenSocket *server,
- ListenSocket *connection) {
+void DevToolsProtocolHandler::OnAcceptConnection(ListenSocket *connection) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
- if (connection_ == NULL) {
- connection_ = connection;
- connection_->AddRef();
- }
- // else the connection will get deleted itself with scoped_refptr
-}
-
-void DevToolsProtocolHandler::DidRead(ListenSocket *connection,
- const std::string& data) {
- // Not used.
+ connection_ = connection;
}
-void DevToolsProtocolHandler::DidClose(ListenSocket *sock) {
+void DevToolsProtocolHandler::OnConnectionLost() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
- DCHECK(connection_ == sock);
connection_ = NULL;
- sock->Release();
for (ToolToListenerMap::const_iterator it = tool_to_listener_map_.begin(),
end = tool_to_listener_map_.end();
it != end;
« no previous file with comments | « chrome/browser/debugger/devtools_protocol_handler.h ('k') | chrome/browser/debugger/devtools_remote.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698