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

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

Issue 6526040: CommandLine refactoring and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits, merge changes. Created 9 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « net/test/test_server_posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/test/test_server_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698