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

Side by Side Diff: net/test/embedded_test_server/http_connection.h

Issue 2531373002: net: Cleanup class/struct forward declarations (Closed)
Patch Set: Rebase on top of master branch Created 4 years 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
« no previous file with comments | « net/test/cert_test_util.h ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_ 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_ 6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
15 #include "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
16 #include "net/base/io_buffer.h" 16 #include "net/base/io_buffer.h"
17 #include "net/test/embedded_test_server/http_request.h" 17 #include "net/test/embedded_test_server/http_request.h"
18 #include "net/test/embedded_test_server/http_response.h" 18 #include "net/test/embedded_test_server/http_response.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 class StreamSocket; 22 class StreamSocket;
23 23
24 namespace test_server { 24 namespace test_server {
25 25
26 class HttpConnection; 26 class HttpConnection;
27 class HttpResponse;
28 27
29 // Calblack called when a request is parsed. Response should be sent 28 // Calblack called when a request is parsed. Response should be sent
30 // using HttpConnection::SendResponse() on the |connection| argument. 29 // using HttpConnection::SendResponse() on the |connection| argument.
31 typedef base::Callback<void(HttpConnection* connection, 30 typedef base::Callback<void(HttpConnection* connection,
32 std::unique_ptr<HttpRequest> request)> 31 std::unique_ptr<HttpRequest> request)>
33 HandleRequestCallback; 32 HandleRequestCallback;
34 33
35 // Wraps the connection socket. Accepts incoming data and sends responses. 34 // Wraps the connection socket. Accepts incoming data and sends responses.
36 // If a valid request is parsed, then |callback_| is invoked. 35 // If a valid request is parsed, then |callback_| is invoked.
37 class HttpConnection { 36 class HttpConnection {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 68
70 base::WeakPtrFactory<HttpConnection> weak_factory_; 69 base::WeakPtrFactory<HttpConnection> weak_factory_;
71 70
72 DISALLOW_COPY_AND_ASSIGN(HttpConnection); 71 DISALLOW_COPY_AND_ASSIGN(HttpConnection);
73 }; 72 };
74 73
75 } // namespace test_server 74 } // namespace test_server
76 } // namespace net 75 } // namespace net
77 76
78 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_ 77 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/test/cert_test_util.h ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698