| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test_server.h" | 5 #include "net/test/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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Pass the handle on the command-line. Although HANDLE is a | 169 // Pass the handle on the command-line. Although HANDLE is a |
| 170 // pointer, truncating it on 64-bit machines is okay. See | 170 // pointer, truncating it on 64-bit machines is okay. See |
| 171 // http://msdn.microsoft.com/en-us/library/aa384203.aspx | 171 // http://msdn.microsoft.com/en-us/library/aa384203.aspx |
| 172 // | 172 // |
| 173 // "64-bit versions of Windows use 32-bit handles for | 173 // "64-bit versions of Windows use 32-bit handles for |
| 174 // interoperability. When sharing a handle between 32-bit and 64-bit | 174 // interoperability. When sharing a handle between 32-bit and 64-bit |
| 175 // applications, only the lower 32 bits are significant, so it is | 175 // applications, only the lower 32 bits are significant, so it is |
| 176 // safe to truncate the handle (when passing it from 64-bit to | 176 // safe to truncate the handle (when passing it from 64-bit to |
| 177 // 32-bit) or sign-extend the handle (when passing it from 32-bit to | 177 // 32-bit) or sign-extend the handle (when passing it from 32-bit to |
| 178 // 64-bit)." | 178 // 64-bit)." |
| 179 python_command.AppendSwitchASCII( | 179 python_command.AppendArg("--startup-pipe=" + |
| 180 "startup-pipe", | |
| 181 base::IntToString(reinterpret_cast<uintptr_t>(child_write))); | 180 base::IntToString(reinterpret_cast<uintptr_t>(child_write))); |
| 182 | 181 |
| 183 if (!LaunchTestServerAsJob(python_command, | 182 if (!LaunchTestServerAsJob(python_command, |
| 184 true, | 183 true, |
| 185 &process_handle_, | 184 &process_handle_, |
| 186 &job_handle_)) { | 185 &job_handle_)) { |
| 187 LOG(ERROR) << "Failed to launch " << python_command.command_line_string(); | 186 LOG(ERROR) << "Failed to launch " << python_command.command_line_string(); |
| 188 return false; | 187 return false; |
| 189 } | 188 } |
| 190 | 189 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 211 | 210 |
| 212 if (!ParseServerData(server_data)) { | 211 if (!ParseServerData(server_data)) { |
| 213 LOG(ERROR) << "Could not parse server_data: " << server_data; | 212 LOG(ERROR) << "Could not parse server_data: " << server_data; |
| 214 return false; | 213 return false; |
| 215 } | 214 } |
| 216 | 215 |
| 217 return true; | 216 return true; |
| 218 } | 217 } |
| 219 | 218 |
| 220 } // namespace net | 219 } // namespace net |
| OLD | NEW |