summaryrefslogtreecommitdiffstats
path: root/chromeos/process_proxy
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
commite5c2a22eb106e0fef92bbf80ac8bf2429980cc4e (patch)
tree480bf91e3cf64d69f837a2f22f8fc868bf17dfdc /chromeos/process_proxy
parent06b1d42b0ceadd4a70b7462c5c7e6adeb5a18ca4 (diff)
downloadchromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.zip
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.gz
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.bz2
Move WriteFile and WriteFileDescriptor from file_util to base namespace.
R=viettrungluu@chromium.org TBR=viettrungluu Review URL: https://codereview.chromium.org/184563006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/process_proxy')
-rw-r--r--chromeos/process_proxy/process_output_watcher_unittest.cc6
-rw-r--r--chromeos/process_proxy/process_proxy.cc8
2 files changed, 7 insertions, 7 deletions
diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc
index b45d137..5eeaf1a 100644
--- a/chromeos/process_proxy/process_output_watcher_unittest.cc
+++ b/chromeos/process_proxy/process_output_watcher_unittest.cc
@@ -118,14 +118,14 @@ public:
if (test_cases[i].should_send_terminating_null)
test_size += sizeof(*test_str.c_str());
EXPECT_EQ(test_size,
- file_util::WriteFileDescriptor(pt_pipe[1], test_str.c_str(),
- test_size));
+ base::WriteFileDescriptor(pt_pipe[1], test_str.c_str(),
+ test_size));
}
all_data_received_->Wait();
// Send stop signal. It is not important which string we send.
- EXPECT_EQ(1, file_util::WriteFileDescriptor(stop_pipe[1], "q", 1));
+ EXPECT_EQ(1, base::WriteFileDescriptor(stop_pipe[1], "q", 1));
EXPECT_NE(-1, IGNORE_EINTR(close(stop_pipe[1])));
EXPECT_NE(-1, IGNORE_EINTR(close(pt_pipe[1])));
diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc
index 3ae1d21..5aa373f 100644
--- a/chromeos/process_proxy/process_proxy.cc
+++ b/chromeos/process_proxy/process_proxy.cc
@@ -132,8 +132,8 @@ bool ProcessProxy::StopWatching() {
// Signal Watcher that we are done. We use self-pipe trick to unblock watcher.
// Anything may be written to the pipe.
const char message[] = "q";
- return file_util::WriteFileDescriptor(shutdown_pipe_[PIPE_END_WRITE],
- message, sizeof(message));
+ return base::WriteFileDescriptor(shutdown_pipe_[PIPE_END_WRITE],
+ message, sizeof(message));
}
void ProcessProxy::Close() {
@@ -160,8 +160,8 @@ bool ProcessProxy::Write(const std::string& text) {
// We don't want to write '\0' to the pipe.
size_t data_size = text.length() * sizeof(*text.c_str());
int bytes_written =
- file_util::WriteFileDescriptor(pt_pair_[PT_MASTER_FD],
- text.c_str(), data_size);
+ base::WriteFileDescriptor(pt_pair_[PT_MASTER_FD],
+ text.c_str(), data_size);
return (bytes_written == static_cast<int>(data_size));
}