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

Unified Diff: chromeos/dbus/pipe_reader.cc

Issue 2081153002: No dbus::FileDescriptor in DebugDaemonClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 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 | « chromeos/dbus/pipe_reader.h ('k') | dbus/message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/pipe_reader.cc
diff --git a/chromeos/dbus/pipe_reader.cc b/chromeos/dbus/pipe_reader.cc
index 70b44b35d6880264cf6e666024cb456499753021..b1a096fd062013feef126d5797e6c57c4f7e6c93 100644
--- a/chromeos/dbus/pipe_reader.cc
+++ b/chromeos/dbus/pipe_reader.cc
@@ -23,15 +23,15 @@ PipeReader::PipeReader(const scoped_refptr<base::TaskRunner>& task_runner,
PipeReader::~PipeReader() {
}
-base::File PipeReader::StartIO() {
+base::ScopedFD PipeReader::StartIO() {
// Use a pipe to collect data
int pipe_fds[2];
const int status = HANDLE_EINTR(pipe(pipe_fds));
if (status < 0) {
PLOG(ERROR) << "pipe";
- return base::File();
+ return base::ScopedFD();
}
- base::File pipe_write_end(pipe_fds[1]);
+ base::ScopedFD pipe_write_end(pipe_fds[1]);
// Pass ownership of pipe_fds[0] to data_stream_, which will close it.
data_stream_.reset(new net::FileStream(
base::File(pipe_fds[0]), task_runner_));
@@ -42,7 +42,7 @@ base::File PipeReader::StartIO() {
base::Bind(&PipeReader::OnDataReady, weak_ptr_factory_.GetWeakPtr()));
if (rv != net::ERR_IO_PENDING) {
LOG(ERROR) << "Unable to post initial read";
- return base::File();
+ return base::ScopedFD();
}
return pipe_write_end;
}
« no previous file with comments | « chromeos/dbus/pipe_reader.h ('k') | dbus/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698