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 ac7d3bc14ac74f56b31f3ab83f5c7511f8cf6fb9..a406a5cffb814138bfd9731aa559bea9b2c3e721 100644 |
--- a/net/test/embedded_test_server/embedded_test_server.cc |
+++ b/net/test/embedded_test_server/embedded_test_server.cc |
@@ -193,7 +193,7 @@ void EmbeddedTestServer::StartThread() { |
} |
void EmbeddedTestServer::InitializeOnIOThread() { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
DCHECK(!Started()); |
SocketDescriptor socket_descriptor = |
@@ -214,13 +214,13 @@ void EmbeddedTestServer::InitializeOnIOThread() { |
} |
void EmbeddedTestServer::ListenOnIOThread() { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
DCHECK(Started()); |
listen_socket_->ListenOnIOThread(); |
} |
void EmbeddedTestServer::ShutdownOnIOThread() { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
listen_socket_.reset(); |
STLDeleteContainerPairSecondPointers(connections_.begin(), |
@@ -230,7 +230,7 @@ void EmbeddedTestServer::ShutdownOnIOThread() { |
void EmbeddedTestServer::HandleRequest(HttpConnection* connection, |
scoped_ptr<HttpRequest> request) { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
bool request_handled = false; |
@@ -260,7 +260,7 @@ void EmbeddedTestServer::HandleRequest(HttpConnection* connection, |
GURL EmbeddedTestServer::GetURL(const std::string& relative_url) const { |
DCHECK(Started()) << "You must start the server first."; |
- DCHECK(StartsWithASCII(relative_url, "/", true /* case_sensitive */)) |
+ DCHECK(base::StartsWith(relative_url, "/", base::CompareCase::SENSITIVE)) |
<< relative_url; |
return base_url_.Resolve(relative_url); |
} |
@@ -287,7 +287,7 @@ void EmbeddedTestServer::RegisterRequestHandler( |
void EmbeddedTestServer::DidAccept( |
StreamListenSocket* server, |
scoped_ptr<StreamListenSocket> connection) { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
HttpConnection* http_connection = new HttpConnection( |
connection.Pass(), |
@@ -300,7 +300,7 @@ void EmbeddedTestServer::DidAccept( |
void EmbeddedTestServer::DidRead(StreamListenSocket* connection, |
const char* data, |
int length) { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
HttpConnection* http_connection = FindConnection(connection); |
if (http_connection == NULL) { |
@@ -311,7 +311,7 @@ void EmbeddedTestServer::DidRead(StreamListenSocket* connection, |
} |
void EmbeddedTestServer::DidClose(StreamListenSocket* connection) { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
HttpConnection* http_connection = FindConnection(connection); |
if (http_connection == NULL) { |
@@ -324,7 +324,7 @@ void EmbeddedTestServer::DidClose(StreamListenSocket* connection) { |
HttpConnection* EmbeddedTestServer::FindConnection( |
StreamListenSocket* socket) { |
- DCHECK(io_thread_->message_loop_proxy()->BelongsToCurrentThread()); |
+ DCHECK(io_thread_->task_runner()->BelongsToCurrentThread()); |
std::map<StreamListenSocket*, HttpConnection*>::iterator it = |
connections_.find(socket); |
@@ -336,7 +336,7 @@ HttpConnection* EmbeddedTestServer::FindConnection( |
bool EmbeddedTestServer::PostTaskToIOThreadAndWait( |
const base::Closure& closure) { |
- // Note that PostTaskAndReply below requires base::MessageLoopProxy::current() |
+ // Note that PostTaskAndReply below requires base::MessageLoop::current() |
// to return a loop for posting the reply task. However, in order to make |
// EmbeddedTestServer universally usable, it needs to cope with the situation |
// where it's running on a thread on which a message loop is not (yet) |
@@ -349,8 +349,8 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait( |
temporary_loop.reset(new base::MessageLoop()); |
base::RunLoop run_loop; |
- if (!io_thread_->message_loop_proxy()->PostTaskAndReply( |
- FROM_HERE, closure, run_loop.QuitClosure())) { |
+ if (!io_thread_->task_runner()->PostTaskAndReply(FROM_HERE, closure, |
+ run_loop.QuitClosure())) { |
return false; |
} |
run_loop.Run(); |