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

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

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/disk_cache/stress_cache.cc ('k') | net/tools/crash_cache/crash_cache.cc » ('j') | 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 <poll.h> 7 #include <poll.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Try to kill any orphaned testserver processes that may be running. 117 // Try to kill any orphaned testserver processes that may be running.
118 OrphanedTestServerFilter filter(testserver_path.value(), 118 OrphanedTestServerFilter filter(testserver_path.value(),
119 base::IntToString(host_port_pair_.port())); 119 base::IntToString(host_port_pair_.port()));
120 if (!base::KillProcesses("python", -1, &filter)) { 120 if (!base::KillProcesses("python", -1, &filter)) {
121 LOG(WARNING) << "Failed to clean up older orphaned testserver instances."; 121 LOG(WARNING) << "Failed to clean up older orphaned testserver instances.";
122 } 122 }
123 123
124 // Launch a new testserver process. 124 // Launch a new testserver process.
125 base::LaunchOptions options; 125 base::LaunchOptions options;
126 options.fds_to_remap = &map_write_fd; 126 options.fds_to_remap = &map_write_fd;
127 options.process_handle = &process_handle_; 127 if (!base::LaunchProcess(python_command, options, &process_handle_)) {
128 if (!base::LaunchProcess(python_command, options)) {
129 LOG(ERROR) << "Failed to launch " << python_command.command_line_string(); 128 LOG(ERROR) << "Failed to launch " << python_command.command_line_string();
130 return false; 129 return false;
131 } 130 }
132 131
133 return true; 132 return true;
134 } 133 }
135 134
136 bool TestServer::WaitToStart() { 135 bool TestServer::WaitToStart() {
137 file_util::ScopedFD child_fd_closer(child_fd_closer_.release()); 136 file_util::ScopedFD child_fd_closer(child_fd_closer_.release());
138 137
(...skipping 18 matching lines...) Expand all
157 156
158 if (!ParseServerData(server_data)) { 157 if (!ParseServerData(server_data)) {
159 LOG(ERROR) << "Could not parse server_data: " << server_data; 158 LOG(ERROR) << "Could not parse server_data: " << server_data;
160 return false; 159 return false;
161 } 160 }
162 161
163 return true; 162 return true;
164 } 163 }
165 164
166 } // namespace net 165 } // namespace net
OLDNEW
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/tools/crash_cache/crash_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698