1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_BASE_TOOLS_HTTP_SESSION_H_
6 #define NET_BASE_TOOLS_HTTP_SESSION_H_
8 #include "base/basictypes.h"
9 #include "net/http/http_request_info.h"
10 #include "net/tools/fetch/http_listen_socket.h"
12 // An HttpSession encapsulates a server-side HTTP listen socket.
13 class HttpSession
: HttpListenSocket::Delegate
{
15 HttpSession(const std::string
& ip
, int port
);
16 virtual ~HttpSession();
18 virtual void OnRequest(HttpListenSocket
* connection
,
19 HttpServerRequestInfo
* info
) OVERRIDE
;
22 scoped_refptr
<HttpListenSocket
> socket_
;
23 DISALLOW_COPY_AND_ASSIGN(HttpSession
);
26 #endif // NET_BASE_TOOLS_HTTP_SESSION_H_