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

Unified Diff: chromeos/dbus/lorgnette_manager_client.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/fake_debug_daemon_client.cc ('k') | chromeos/dbus/pipe_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/lorgnette_manager_client.cc
diff --git a/chromeos/dbus/lorgnette_manager_client.cc b/chromeos/dbus/lorgnette_manager_client.cc
index c7feacdc745bf6bd29493db7e5e32a8d411a4959..f3fd54130a73d81970baa848e6fc08f1155f23ac 100644
--- a/chromeos/dbus/lorgnette_manager_client.cc
+++ b/chromeos/dbus/lorgnette_manager_client.cc
@@ -72,9 +72,10 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient {
// Owned by the callback created in scan_to_string_completion->Start().
ScanToStringCompletion* scan_to_string_completion =
new ScanToStringCompletion();
- base::File file;
+ base::ScopedFD fd;
ScanImageToFileCallback file_callback =
- scan_to_string_completion->Start(callback, &file);
+ scan_to_string_completion->Start(callback, &fd);
+ base::File file(fd.release());
ScanImageToFile(device_name, properties, file_callback, &file);
}
@@ -96,7 +97,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient {
// of |this| to a returned callback that can be handed to a
// ScanImageToFile invocation.
ScanImageToFileCallback Start(const ScanImageToStringCallback& callback,
- base::File *file) {
+ base::ScopedFD* fd) {
CHECK(!pipe_reader_.get());
const bool kTasksAreSlow = true;
scoped_refptr<base::TaskRunner> task_runner =
@@ -106,7 +107,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient {
task_runner,
base::Bind(&ScanToStringCompletion::OnScanToStringDataCompleted,
base::Unretained(this))));
- *file = pipe_reader_->StartIO();
+ *fd = pipe_reader_->StartIO();
return base::Bind(&ScanToStringCompletion::OnScanToStringCompleted,
base::Owned(this), callback);
« no previous file with comments | « chromeos/dbus/fake_debug_daemon_client.cc ('k') | chromeos/dbus/pipe_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698