Skip to content

Commit

Permalink
Remove TestServer::WaitToFinish, it is now unused.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3555012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61639 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
phajdan.jr@chromium.org committed Oct 6, 2010
1 parent a66397e commit 3d0a309
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 30 deletions.
9 changes: 0 additions & 9 deletions chrome_frame/test/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ void ChromeFrameHTTPServer::TearDown() {
file_util::Delete(cfi_path, false);
}

bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) {
bool ret = test_server_.WaitToFinish(milliseconds);
if (!ret) {
LOG(ERROR) << "WaitToFinish failed with error:" << ::GetLastError();
ret = test_server_.Stop();
}
return ret;
}

// TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers.
GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) {
return test_server_.GetURL(WideToUTF8(relative_url));
Expand Down
1 change: 0 additions & 1 deletion chrome_frame/test/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ChromeFrameHTTPServer {

void SetUp();
void TearDown();
bool WaitToFinish(int milliseconds);
GURL Resolve(const wchar_t* relative_url);
FilePath GetDataDir();

Expand Down
14 changes: 0 additions & 14 deletions net/test/test_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,6 @@ bool TestServer::Stop() {
return ret;
}

bool TestServer::WaitToFinish(int timeout_ms) {
if (!process_handle_)
return true;

bool ret = base::WaitForSingleProcess(process_handle_, timeout_ms);
if (ret) {
base::CloseProcessHandle(process_handle_);
process_handle_ = base::kNullProcessHandle;
} else {
LOG(ERROR) << "Timed out.";
}
return ret;
}

std::string TestServer::GetScheme() const {
switch (type_) {
case TYPE_FTP:
Expand Down
6 changes: 0 additions & 6 deletions net/test/test_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ class TestServer {
// Stop the server started by Start().
bool Stop();

// If you access the server's Kill url, it will exit by itself
// without a call to Stop().
// WaitToFinish is handy in that case.
// It returns true if the server exited cleanly.
bool WaitToFinish(int milliseconds) WARN_UNUSED_RESULT;

const FilePath& document_root() const { return document_root_; }
const HostPortPair& host_port_pair() const { return host_port_pair_; }
std::string GetScheme() const;
Expand Down

0 comments on commit 3d0a309

Please sign in to comment.