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

Side by Side Diff: net/server/http_listen_socket.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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifdef _WIN32 5 #ifdef _WIN32
6 #include <winsock2.h> 6 #include <winsock2.h>
7 #else 7 #else
8 #include <arpa/inet.h> 8 #include <arpa/inet.h>
9 #endif 9 #endif
10 10
(...skipping 19 matching lines...) Expand all
30 // must run in the IO thread 30 // must run in the IO thread
31 HttpListenSocket::~HttpListenSocket() { 31 HttpListenSocket::~HttpListenSocket() {
32 } 32 }
33 33
34 void HttpListenSocket::Accept() { 34 void HttpListenSocket::Accept() {
35 SOCKET conn = ListenSocket::Accept(socket_); 35 SOCKET conn = ListenSocket::Accept(socket_);
36 DCHECK_NE(conn, ListenSocket::kInvalidSocket); 36 DCHECK_NE(conn, ListenSocket::kInvalidSocket);
37 if (conn == ListenSocket::kInvalidSocket) { 37 if (conn == ListenSocket::kInvalidSocket) {
38 // TODO 38 // TODO
39 } else { 39 } else {
40 scoped_refptr<HttpListenSocket> sock = 40 scoped_refptr<HttpListenSocket> sock(
41 new HttpListenSocket(conn, delegate_); 41 new HttpListenSocket(conn, delegate_));
42 #if defined(OS_POSIX) 42 #if defined(OS_POSIX)
43 sock->WatchSocket(WAITING_READ); 43 sock->WatchSocket(WAITING_READ);
44 #endif 44 #endif
45 // it's up to the delegate to AddRef if it wants to keep it around 45 // it's up to the delegate to AddRef if it wants to keep it around
46 DidAccept(this, sock); 46 DidAccept(this, sock);
47 } 47 }
48 } 48 }
49 49
50 HttpListenSocket* HttpListenSocket::Listen( 50 HttpListenSocket* HttpListenSocket::Listen(
51 const std::string& ip, 51 const std::string& ip,
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 } 341 }
342 delegate_->OnHttpRequest(this, request); 342 delegate_->OnHttpRequest(this, request);
343 } 343 }
344 } 344 }
345 345
346 void HttpListenSocket::DidClose(ListenSocket* sock) { 346 void HttpListenSocket::DidClose(ListenSocket* sock) {
347 sock->Release(); 347 sock->Release();
348 delegate_->OnClose(this); 348 delegate_->OnClose(this);
349 } 349 }
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/socket/client_socket_pool_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698