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

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

Issue 418043002: Add test for showing confirmation dialog for unsecure signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix isolate dependency Created 6 years, 3 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 | « net/test/embedded_test_server/embedded_test_server.h ('k') | no next file » | 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.cc
diff --git a/net/test/embedded_test_server/embedded_test_server.cc b/net/test/embedded_test_server/embedded_test_server.cc
index 2912adfd0b5a8cfb46300b6f690dd22cc6a82ae2..3d609cca4e43972898dd4d350e4a672812fb58c2 100644
--- a/net/test/embedded_test_server/embedded_test_server.cc
+++ b/net/test/embedded_test_server/embedded_test_server.cc
@@ -95,6 +95,18 @@ void HttpListenSocket::Listen() {
TCPListenSocket::Listen();
}
+void HttpListenSocket::ListenOnIOThread() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+#if !defined(OS_POSIX)
+ // This method may be called after the IO thread is changed, thus we need to
+ // call |WatchSocket| again to make sure it listens on the current IO thread.
+ // Only needed for non POSIX platforms, since on POSIX platforms
+ // StreamListenSocket::Listen already calls WatchSocket inside the function.
+ WatchSocket(WAITING_ACCEPT);
+#endif
+ Listen();
+}
+
HttpListenSocket::~HttpListenSocket() {
DCHECK(thread_checker_.CalledOnValidThread());
}
@@ -198,7 +210,7 @@ void EmbeddedTestServer::InitializeOnIOThread() {
void EmbeddedTestServer::ListenOnIOThread() {
DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread());
DCHECK(Started());
- listen_socket_->Listen();
+ listen_socket_->ListenOnIOThread();
}
void EmbeddedTestServer::ShutdownOnIOThread() {
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698