OLD | NEW |
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/spawned_test_server/local_test_server.h" | 5 #include "net/test/spawned_test_server/local_test_server.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <wincrypt.h> | 8 #include <wincrypt.h> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 environment_->UnSetVar("PATH"); | 134 environment_->UnSetVar("PATH"); |
135 else | 135 else |
136 environment_->SetVar("PATH", old_path_); | 136 environment_->SetVar("PATH", old_path_); |
137 } | 137 } |
138 | 138 |
139 } // namespace | 139 } // namespace |
140 | 140 |
141 namespace net { | 141 namespace net { |
142 | 142 |
143 bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) { | 143 bool LocalTestServer::LaunchPython(const base::FilePath& testserver_path) { |
144 CommandLine python_command(CommandLine::NO_PROGRAM); | 144 base::CommandLine python_command(base::CommandLine::NO_PROGRAM); |
145 if (!GetPythonCommand(&python_command)) | 145 if (!GetPythonCommand(&python_command)) |
146 return false; | 146 return false; |
147 | 147 |
148 python_command.AppendArgPath(testserver_path); | 148 python_command.AppendArgPath(testserver_path); |
149 if (!AddCommandLineArguments(&python_command)) | 149 if (!AddCommandLineArguments(&python_command)) |
150 return false; | 150 return false; |
151 | 151 |
152 HANDLE child_read = NULL; | 152 HANDLE child_read = NULL; |
153 HANDLE child_write = NULL; | 153 HANDLE child_write = NULL; |
154 if (!CreatePipe(&child_read, &child_write, NULL, 0)) { | 154 if (!CreatePipe(&child_read, &child_write, NULL, 0)) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 if (!ParseServerData(server_data)) { | 222 if (!ParseServerData(server_data)) { |
223 LOG(ERROR) << "Could not parse server_data: " << server_data; | 223 LOG(ERROR) << "Could not parse server_data: " << server_data; |
224 return false; | 224 return false; |
225 } | 225 } |
226 | 226 |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
230 } // namespace net | 230 } // namespace net |
231 | 231 |
OLD | NEW |