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

Unified Diff: net/test/embedded_test_server/http_connection.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/test/embedded_test_server/http_connection.h
diff --git a/net/test/embedded_test_server/http_connection.h b/net/test/embedded_test_server/http_connection.h
deleted file mode 100644
index 870d12269dd10253f5a28330e6f2eaf0ecb0b010..0000000000000000000000000000000000000000
--- a/net/test/embedded_test_server/http_connection.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
-#define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
-
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/strings/string_piece.h"
-#include "net/test/embedded_test_server/http_request.h"
-
-namespace net {
-
-class StreamListenSocket;
-
-namespace test_server {
-
-class HttpConnection;
-class HttpResponse;
-
-// Calblack called when a request is parsed. Response should be sent
-// using HttpConnection::SendResponse() on the |connection| argument.
-typedef base::Callback<void(HttpConnection* connection,
- scoped_ptr<HttpRequest> request)>
- HandleRequestCallback;
-
-// Wraps the connection socket. Accepts incoming data and sends responses.
-// If a valid request is parsed, then |callback_| is invoked.
-class HttpConnection {
- public:
- HttpConnection(scoped_ptr<StreamListenSocket> socket,
- const HandleRequestCallback& callback);
- ~HttpConnection();
-
- // Sends the HTTP response to the client.
- void SendResponse(scoped_ptr<HttpResponse> response) const;
-
- private:
- friend class EmbeddedTestServer;
-
- // Accepts raw chunk of data from the client. Internally, passes it to the
- // HttpRequestParser class. If a request is parsed, then |callback_| is
- // called.
- void ReceiveData(const base::StringPiece& data);
-
- scoped_ptr<StreamListenSocket> socket_;
- const HandleRequestCallback callback_;
- HttpRequestParser request_parser_;
-
- DISALLOW_COPY_AND_ASSIGN(HttpConnection);
-};
-
-} // namespace test_server
-} // namespace net
-
-#endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server_unittest.cc ('k') | net/test/embedded_test_server/http_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698