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

Side by Side Diff: net/server/http_connection.h

Issue 7540023: DevTools: no way to remote debug using ToT build as a client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments addressed. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef NET_SERVER_HTTP_CONNECTION_H_
6 #define NET_SERVER_HTTP_CONNECTION_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14
15 namespace net {
16
17 class HttpServer;
18 class HttpServerRequestInfo;
19 class ListenSocket;
20 class WebSocket;
21
22 class HttpConnection {
23 public:
24 void Send(const std::string& data);
25 void Send(const char* bytes, int len);
26 void Send200(const std::string& data, const std::string& content_type);
27 void Send404();
28 void Send500(const std::string& message);
29
30 void Shift(int num_bytes);
31
32 const std::string& recv_data() const { return recv_data_; }
33 const int id() const { return id_; }
34
35 private:
36 friend class HttpServer;
37 static int lastId_;
eroman 2011/08/02 19:01:33 last_id_
38
39 HttpConnection(HttpServer* server, ListenSocket* sock);
40 ~HttpConnection();
41
42 void DetachSocket();
43
44 HttpServer* server_;
45 scoped_refptr<ListenSocket> socket_;
46 scoped_ptr<WebSocket> web_socket_;
47 std::string recv_data_;
48 int id_;
49 DISALLOW_COPY_AND_ASSIGN(HttpConnection);
50 };
51
52 } // namespace net
53
54 #endif // NET_SERVER_HTTP_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/server/http_connection.cc » ('j') | net/server/web_socket.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698