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

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

Issue 1881463003: Add a browsertest suite for net predictor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a "forgetting" test + fix typo Created 4 years, 8 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
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_EMBEDDED_TEST_SERVER_H_ 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ 6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // The most general purpose method. Any request processing can be added using 204 // The most general purpose method. Any request processing can be added using
205 // this method. Takes ownership of the object. The |callback| is called 205 // this method. Takes ownership of the object. The |callback| is called
206 // on UI thread. 206 // on UI thread.
207 void RegisterRequestHandler(const HandleRequestCallback& callback); 207 void RegisterRequestHandler(const HandleRequestCallback& callback);
208 208
209 // Adds default handlers, including those added by AddDefaultHandlers, to be 209 // Adds default handlers, including those added by AddDefaultHandlers, to be
210 // tried after all other user-specified handlers have been tried. 210 // tried after all other user-specified handlers have been tried.
211 void RegisterDefaultHandler(const HandleRequestCallback& callback); 211 void RegisterDefaultHandler(const HandleRequestCallback& callback);
212 212
213 bool FlushAllSocketsAndConnectionsOnUIThread();
214 void FlushAllSocketsAndConnections();
215
213 private: 216 private:
214 // Shuts down the server. 217 // Shuts down the server.
215 void ShutdownOnIOThread(); 218 void ShutdownOnIOThread();
216 219
217 // Upgrade the TCP connection to one over SSL. 220 // Upgrade the TCP connection to one over SSL.
218 scoped_ptr<StreamSocket> DoSSLUpgrade(scoped_ptr<StreamSocket> connection); 221 scoped_ptr<StreamSocket> DoSSLUpgrade(scoped_ptr<StreamSocket> connection);
219 // Handles async callback when the SSL handshake has been completed. 222 // Handles async callback when the SSL handshake has been completed.
220 void OnHandshakeDone(HttpConnection* connection, int rv); 223 void OnHandshakeDone(HttpConnection* connection, int rv);
221 224
222 // Begins accepting new client connections. 225 // Begins accepting new client connections.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 }; 288 };
286 289
287 } // namespace test_server 290 } // namespace test_server
288 291
289 // TODO(svaldez): Refactor EmbeddedTestServer to be in the net namespace. 292 // TODO(svaldez): Refactor EmbeddedTestServer to be in the net namespace.
290 using test_server::EmbeddedTestServer; 293 using test_server::EmbeddedTestServer;
291 294
292 } // namespace net 295 } // namespace net
293 296
294 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ 297 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698