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

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

Issue 37683004: GTTF: Make EmbeddedTestServer always use its own thread for IO (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 2 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
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | net/test/embedded_test_server/embedded_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/embedded_test_server/embedded_test_server.h
diff --git a/net/test/embedded_test_server/embedded_test_server.h b/net/test/embedded_test_server/embedded_test_server.h
index f8c1bb5b3cb2a9be58a9b678aa01b032b9c59ac8..a419951bae7259aa9c7a14fccafac44b494c4edc 100644
--- a/net/test/embedded_test_server/embedded_test_server.h
+++ b/net/test/embedded_test_server/embedded_test_server.h
@@ -14,6 +14,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
#include "net/socket/tcp_listen_socket.h"
#include "url/gurl.h"
@@ -81,11 +82,9 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
typedef base::Callback<scoped_ptr<HttpResponse>(
const HttpRequest& request)> HandleRequestCallback;
- // Creates a http test server. |io_thread| is a task runner
- // with IO message loop, used as a backend thread.
- // InitializeAndWaitUntilReady() must be called to start the server.
- explicit EmbeddedTestServer(
- const scoped_refptr<base::SingleThreadTaskRunner>& io_thread);
+ // Creates a http test server. InitializeAndWaitUntilReady() must be called
+ // to start the server.
+ EmbeddedTestServer();
virtual ~EmbeddedTestServer();
// Initializes and waits until the server is ready to accept requests.
@@ -150,7 +149,7 @@ class EmbeddedTestServer : public StreamListenSocket::Delegate {
bool PostTaskToIOThreadAndWait(
const base::Closure& closure) WARN_UNUSED_RESULT;
- scoped_refptr<base::SingleThreadTaskRunner> io_thread_;
+ base::Thread io_thread_;
scoped_ptr<HttpListenSocket> listen_socket_;
int port_;
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | net/test/embedded_test_server/embedded_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698