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

Unified Diff: net/tools/fetch/http_listen_socket.h

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: net/tools/fetch/http_listen_socket.h
===================================================================
--- net/tools/fetch/http_listen_socket.h (revision 31079)
+++ net/tools/fetch/http_listen_socket.h (working copy)
@@ -14,16 +14,15 @@
// Implements a simple HTTP listen socket on top of the raw socket interface.
class HttpListenSocket : public ListenSocket,
public ListenSocket::ListenSocketDelegate {
-public:
+ public:
class Delegate {
public:
- virtual void OnRequest(HttpListenSocket* connection,
+ virtual void OnRequest(HttpListenSocket* connection,
HttpServerRequestInfo* info) = 0;
};
static HttpListenSocket* Listen(const std::string& ip, int port,
HttpListenSocket::Delegate* delegate);
- virtual ~HttpListenSocket();
void Listen() { ListenSocket::Listen(); }
virtual void Accept();
@@ -37,9 +36,12 @@
virtual void DidRead(ListenSocket* connection, const std::string& data);
virtual void DidClose(ListenSocket* sock);
-private:
+ private:
+ friend class base::RefCountedThreadSafe<ListenSocket>;
+
static const int kReadBufSize = 16 * 1024;
HttpListenSocket(SOCKET s, HttpListenSocket::Delegate* del);
+ virtual ~HttpListenSocket();
// Expects the raw data to be stored in recv_data_. If parsing is successful,
// will remove the data parsed from recv_data_, leaving only the unused

Powered by Google App Engine
This is Rietveld 408576698