aboutsummaryrefslogtreecommitdiffstats
path: root/brillo
diff options
context:
space:
mode:
authorEric Caruso <ejcaruso@chromium.org>2018-02-06 16:39:50 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-08 19:43:51 -0800
commit48386c33c7caaf1015d7c4b15991ace455eb3fa2 (patch)
treee11fe922d3e711d01a4eea852a0dcab6438b1b5e /brillo
parent91944f28f4685f6fcf46720339b1834717b8a23e (diff)
downloadplatform_external_libbrillo-48386c33c7caaf1015d7c4b15991ace455eb3fa2.tar.gz
platform_external_libbrillo-48386c33c7caaf1015d7c4b15991ace455eb3fa2.tar.bz2
platform_external_libbrillo-48386c33c7caaf1015d7c4b15991ace455eb3fa2.zip
libbrillo: add location to FileDescriptorWatcher constructor
The constructor for this upstream takes a Location object. We've added this as a transparent wrapper around the current nullary constructor so we can move to the new API without changing the client code. BUG=b:37434548 TEST=unit tests Change-Id: I3889a74e8561a9e5c77a05bc938745cac2d01661 Reviewed-on: https://chromium-review.googlesource.com/905510 Commit-Ready: Eric Caruso <ejcaruso@chromium.org> Tested-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org>
Diffstat (limited to 'brillo')
-rw-r--r--brillo/http/http_transport_curl.cc3
-rw-r--r--brillo/message_loops/base_message_loop.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/brillo/http/http_transport_curl.cc b/brillo/http/http_transport_curl.cc
index 7c2472a..ea8ccb5 100644
--- a/brillo/http/http_transport_curl.cc
+++ b/brillo/http/http_transport_curl.cc
@@ -40,7 +40,8 @@ class Transport::SocketPollData : public base::MessageLoopForIO::Watcher {
: curl_interface_(curl_interface),
curl_multi_handle_(curl_multi_handle),
transport_(transport),
- socket_fd_(socket_fd) {}
+ socket_fd_(socket_fd),
+ file_descriptor_watcher_(FROM_HERE) {}
// Returns the pointer for the socket-specific file descriptor watcher.
base::MessageLoopForIO::FileDescriptorWatcher* GetWatcher() {
diff --git a/brillo/message_loops/base_message_loop.cc b/brillo/message_loops/base_message_loop.cc
index 4ea0f08..ec85a75 100644
--- a/brillo/message_loops/base_message_loop.cc
+++ b/brillo/message_loops/base_message_loop.cc
@@ -311,7 +311,8 @@ BaseMessageLoop::IOTask::IOTask(const tracked_objects::Location& location,
bool persistent,
const Closure& task)
: location_(location), loop_(loop), task_id_(task_id),
- fd_(fd), base_mode_(base_mode), persistent_(persistent), closure_(task) {}
+ fd_(fd), base_mode_(base_mode), persistent_(persistent), closure_(task),
+ fd_watcher_(FROM_HERE) {}
bool BaseMessageLoop::IOTask::StartWatching() {
return loop_->base_loop_->WatchFileDescriptor(