summaryrefslogtreecommitdiffstats
path: root/net/server/http_server.h
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 09:44:41 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-11 09:44:41 +0000
commite67d2179178b955a07df2c908d8c49a26fb0e71d (patch)
treec7f1113691da747da61a7e76b5574d25ba2afebf /net/server/http_server.h
parenta942b8c1ca4b002376306cf399e000d0842c630b (diff)
downloadchromium_src-e67d2179178b955a07df2c908d8c49a26fb0e71d.zip
chromium_src-e67d2179178b955a07df2c908d8c49a26fb0e71d.tar.gz
chromium_src-e67d2179178b955a07df2c908d8c49a26fb0e71d.tar.bz2
DevTools: add /json/activate/ command to the discovery protocol.
This change adds suppot for /activate command and refactors the json commands handling so that all commands supported jsonp properly. For the jsonp support, we always respond with 200 OK and specify the actual code in the jsonp call parameter. For the above purposes, migrates net/server/http_server from Send404() scheme to Send(net::HTTP_NOT_FOUND). BUG=157495 Review URL: https://chromiumcodereview.appspot.com/11499004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/server/http_server.h')
-rw-r--r--net/server/http_server.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/server/http_server.h b/net/server/http_server.h
index bc6a290..54773ad 100644
--- a/net/server/http_server.h
+++ b/net/server/http_server.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "net/base/stream_listen_socket.h"
+#include "net/http/http_status_code.h"
namespace net {
@@ -45,13 +46,16 @@ class HttpServer : public StreamListenSocket::Delegate,
void AcceptWebSocket(int connection_id,
const HttpServerRequestInfo& request);
void SendOverWebSocket(int connection_id, const std::string& data);
- void Send(int connection_id, const std::string& data);
- void Send(int connection_id, const char* bytes, int len);
+ void Send(int connection_id,
+ HttpStatusCode status_code,
+ const std::string& data,
+ const std::string& mime_type);
void Send200(int connection_id,
const std::string& data,
const std::string& mime_type);
void Send404(int connection_id);
void Send500(int connection_id, const std::string& message);
+
void Close(int connection_id);
// Copies the local address to |address|. Returns a network error code.