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

Unified Diff: net/test/spawned_test_server/local_test_server_posix.cc

Issue 197873014: Revert of Implement ScopedFD in terms of ScopedGeneric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/test/spawned_test_server/local_test_server.h ('k') | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/spawned_test_server/local_test_server_posix.cc
diff --git a/net/test/spawned_test_server/local_test_server_posix.cc b/net/test/spawned_test_server/local_test_server_posix.cc
index ea9cab64e61180a7ded451dd82e363b1249ab5c0..10c2d0f9932d5444b504422aae8abdad2d248418 100644
--- a/net/test/spawned_test_server/local_test_server_posix.cc
+++ b/net/test/spawned_test_server/local_test_server_posix.cc
@@ -10,7 +10,6 @@
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
@@ -121,8 +120,9 @@
}
// Save the read half. The write half is sent to the child.
- child_fd_.reset(pipefd[0]);
- base::ScopedFD write_closer(pipefd[1]);
+ child_fd_ = pipefd[0];
+ child_fd_closer_.reset(&child_fd_);
+ file_util::ScopedFD write_closer(&pipefd[1]);
base::FileHandleMappingVector map_write_fd;
map_write_fd.push_back(std::make_pair(pipefd[1], pipefd[1]));
@@ -148,19 +148,19 @@
}
bool LocalTestServer::WaitToStart() {
- base::ScopedFD our_fd(child_fd_.release());
+ file_util::ScopedFD child_fd_closer(child_fd_closer_.release());
base::TimeDelta remaining_time = TestTimeouts::action_timeout();
uint32 server_data_len = 0;
- if (!ReadData(our_fd.get(), sizeof(server_data_len),
+ if (!ReadData(child_fd_, sizeof(server_data_len),
reinterpret_cast<uint8*>(&server_data_len),
&remaining_time)) {
LOG(ERROR) << "Could not read server_data_len";
return false;
}
std::string server_data(server_data_len, '\0');
- if (!ReadData(our_fd.get(), server_data_len,
+ if (!ReadData(child_fd_, server_data_len,
reinterpret_cast<uint8*>(&server_data[0]),
&remaining_time)) {
LOG(ERROR) << "Could not read server_data (" << server_data_len
« no previous file with comments | « net/test/spawned_test_server/local_test_server.h ('k') | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698