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

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

Issue 9429039: Cleanup: Remove base::environment_vector and base::file_handle_mapping_vector to StudlyCaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « ipc/ipc_tests.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) 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/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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int pipefd[2]; 102 int pipefd[2];
103 if (pipe(pipefd) != 0) { 103 if (pipe(pipefd) != 0) {
104 PLOG(ERROR) << "Could not create pipe."; 104 PLOG(ERROR) << "Could not create pipe.";
105 return false; 105 return false;
106 } 106 }
107 107
108 // Save the read half. The write half is sent to the child. 108 // Save the read half. The write half is sent to the child.
109 child_fd_ = pipefd[0]; 109 child_fd_ = pipefd[0];
110 child_fd_closer_.reset(&child_fd_); 110 child_fd_closer_.reset(&child_fd_);
111 file_util::ScopedFD write_closer(&pipefd[1]); 111 file_util::ScopedFD write_closer(&pipefd[1]);
112 base::file_handle_mapping_vector map_write_fd; 112 base::FileHandleMappingVector map_write_fd;
113 map_write_fd.push_back(std::make_pair(pipefd[1], pipefd[1])); 113 map_write_fd.push_back(std::make_pair(pipefd[1], pipefd[1]));
114 114
115 python_command.AppendArg("--startup-pipe=" + base::IntToString(pipefd[1])); 115 python_command.AppendArg("--startup-pipe=" + base::IntToString(pipefd[1]));
116 116
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 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 if (!ParseServerData(server_data)) { 157 if (!ParseServerData(server_data)) {
158 LOG(ERROR) << "Could not parse server_data: " << server_data; 158 LOG(ERROR) << "Could not parse server_data: " << server_data;
159 return false; 159 return false;
160 } 160 }
161 161
162 return true; 162 return true;
163 } 163 }
164 164
165 } // namespace net 165 } // namespace net
OLDNEW
« no previous file with comments | « ipc/ipc_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698