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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 #include "net/test/embedded_test_server/embedded_test_server.h" 5 #include "net/test/embedded_test_server/embedded_test_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 HttpListenSocket::~HttpListenSocket() { 109 HttpListenSocket::~HttpListenSocket() {
110 DCHECK(thread_checker_.CalledOnValidThread()); 110 DCHECK(thread_checker_.CalledOnValidThread());
111 } 111 }
112 112
113 void HttpListenSocket::DetachFromThread() { 113 void HttpListenSocket::DetachFromThread() {
114 thread_checker_.DetachFromThread(); 114 thread_checker_.DetachFromThread();
115 } 115 }
116 116
117 EmbeddedTestServer::EmbeddedTestServer() 117 EmbeddedTestServer::EmbeddedTestServer()
118 : port_(-1), 118 : port_(0),
119 weak_factory_(this) { 119 weak_factory_(this) {
120 DCHECK(thread_checker_.CalledOnValidThread()); 120 DCHECK(thread_checker_.CalledOnValidThread());
121 } 121 }
122 122
123 EmbeddedTestServer::~EmbeddedTestServer() { 123 EmbeddedTestServer::~EmbeddedTestServer() {
124 DCHECK(thread_checker_.CalledOnValidThread()); 124 DCHECK(thread_checker_.CalledOnValidThread());
125 125
126 if (Started() && !ShutdownAndWaitUntilComplete()) { 126 if (Started() && !ShutdownAndWaitUntilComplete()) {
127 LOG(ERROR) << "EmbeddedTestServer failed to shut down."; 127 LOG(ERROR) << "EmbeddedTestServer failed to shut down.";
128 } 128 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 FROM_HERE, closure, run_loop.QuitClosure())) { 346 FROM_HERE, closure, run_loop.QuitClosure())) {
347 return false; 347 return false;
348 } 348 }
349 run_loop.Run(); 349 run_loop.Run();
350 350
351 return true; 351 return true;
352 } 352 }
353 353
354 } // namespace test_server 354 } // namespace test_server
355 } // namespace net 355 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server.h ('k') | net/test/embedded_test_server/embedded_test_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698