| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome_frame/test/http_server.h" | 5 #include "chrome_frame/test/http_server.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 .Append(FILE_PATH_LITERAL("data")) | 60 .Append(FILE_PATH_LITERAL("data")) |
| 61 .Append(FILE_PATH_LITERAL("CFInstall.js")); | 61 .Append(FILE_PATH_LITERAL("CFInstall.js")); |
| 62 | 62 |
| 63 file_util::Delete(cfi_path, false); | 63 file_util::Delete(cfi_path, false); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) { | 66 bool ChromeFrameHTTPServer::WaitToFinish(int milliseconds) { |
| 67 bool ret = test_server_.WaitToFinish(milliseconds); | 67 bool ret = test_server_.WaitToFinish(milliseconds); |
| 68 if (!ret) { | 68 if (!ret) { |
| 69 LOG(ERROR) << "WaitToFinish failed with error:" << ::GetLastError(); | 69 LOG(ERROR) << "WaitToFinish failed with error:" << ::GetLastError(); |
| 70 } else { | |
| 71 ret = test_server_.Stop(); | 70 ret = test_server_.Stop(); |
| 72 } | 71 } |
| 73 return ret; | 72 return ret; |
| 74 } | 73 } |
| 75 | 74 |
| 76 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers. | 75 // TODO(phajdan.jr): Change wchar_t* to std::string& and fix callers. |
| 77 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { | 76 GURL ChromeFrameHTTPServer::Resolve(const wchar_t* relative_url) { |
| 78 return test_server_.GetURL(WideToUTF8(relative_url)); | 77 return test_server_.GetURL(WideToUTF8(relative_url)); |
| 79 } | 78 } |
| 80 | 79 |
| 81 FilePath ChromeFrameHTTPServer::GetDataDir() { | 80 FilePath ChromeFrameHTTPServer::GetDataDir() { |
| 82 return test_server_.document_root(); | 81 return test_server_.document_root(); |
| 83 } | 82 } |
| OLD | NEW |