aboutsummaryrefslogtreecommitdiffstats
path: root/brillo
diff options
context:
space:
mode:
authorQijiang Fan <fqj@chromium.org>2020-05-01 20:22:27 +0900
committerCommit Bot <commit-bot@chromium.org>2020-05-02 00:10:34 +0000
commit5ca60b93db03a1dfaaa7e603fc163402aee347d0 (patch)
tree487cff23dd73591dc0e7d0775b3ad371feb55f67 /brillo
parenta008f55e897526d85df3a3009e595981d236bc69 (diff)
downloadplatform_external_libbrillo-5ca60b93db03a1dfaaa7e603fc163402aee347d0.tar.gz
platform_external_libbrillo-5ca60b93db03a1dfaaa7e603fc163402aee347d0.tar.bz2
platform_external_libbrillo-5ca60b93db03a1dfaaa7e603fc163402aee347d0.zip
libbrillo: update for libchrome uprev to r680000.
- dbus::PropertySet::SetCallback is now a OnceCallback, and not copyable anymore. - base::MessageLoopForIO::current() is deprecated, and use base::ThreadTaskRunnerHandle::Get() instead to access the TaskRunner. BUG=chromium:1054279 TEST=CQ Change-Id: I4e76c9b0e3ebd2535fe19e697c93b58c516f1a05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2175972 Reviewed-by: Eric Caruso <ejcaruso@chromium.org> Commit-Queue: Qijiang Fan <fqj@google.com> Tested-by: Qijiang Fan <fqj@google.com> Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2 Cr-Mirrored-Commit: b41aadb81433837a8de2fa06d6a93895edee9fa6
Diffstat (limited to 'brillo')
-rw-r--r--brillo/dbus/dbus_property.h4
-rw-r--r--brillo/http/http_transport_curl.cc18
2 files changed, 11 insertions, 11 deletions
diff --git a/brillo/dbus/dbus_property.h b/brillo/dbus/dbus_property.h
index 77b7328..f82759e 100644
--- a/brillo/dbus/dbus_property.h
+++ b/brillo/dbus/dbus_property.h
@@ -5,6 +5,8 @@
#ifndef LIBBRILLO_BRILLO_DBUS_DBUS_PROPERTY_H_
#define LIBBRILLO_BRILLO_DBUS_DBUS_PROPERTY_H_
+#include <utility>
+
#include <brillo/dbus/data_serialization.h>
#include <dbus/property.h>
@@ -42,7 +44,7 @@ class Property : public ::dbus::PropertyBase {
// remote object.
void Set(const T& value, ::dbus::PropertySet::SetCallback callback) {
set_value_ = value;
- property_set()->Set(this, callback);
+ property_set()->Set(this, std::move(callback));
}
// Synchronous version of Set().
diff --git a/brillo/http/http_transport_curl.cc b/brillo/http/http_transport_curl.cc
index c1058ad..de6899a 100644
--- a/brillo/http/http_transport_curl.cc
+++ b/brillo/http/http_transport_curl.cc
@@ -10,8 +10,8 @@
#include <base/files/file_descriptor_watcher_posix.h>
#include <base/files/file_util.h>
#include <base/logging.h>
-#include <base/message_loop/message_loop.h>
#include <base/strings/stringprintf.h>
+#include <base/threading/thread_task_runner_handle.h>
#include <brillo/http/http_connection_curl.h>
#include <brillo/http/http_request.h>
#include <brillo/strings/string_utils.h>
@@ -222,8 +222,7 @@ std::shared_ptr<http::Connection> Transport::CreateConnection(
void Transport::RunCallbackAsync(const base::Location& from_here,
const base::Closure& callback) {
- base::MessageLoopForIO::current()->task_runner()->PostTask(
- from_here, callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(from_here, callback);
}
RequestID Transport::StartAsyncTransfer(http::Connection* connection,
@@ -399,8 +398,7 @@ int Transport::MultiSocketCallback(CURL* easy,
poll_data->StopWatcher();
// This method can be called indirectly from SocketPollData::OnSocketReady,
// so delay destruction of SocketPollData object till the next loop cycle.
- base::MessageLoopForIO::current()->task_runner()->DeleteSoon(
- FROM_HERE, poll_data);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, poll_data);
return 0;
}
@@ -424,11 +422,11 @@ int Transport::MultiTimerCallback(CURLM* /* multi */,
// Cancel any previous timer callbacks.
transport->weak_ptr_factory_for_timer_.InvalidateWeakPtrs();
if (timeout_ms >= 0) {
- base::MessageLoopForIO::current()->task_runner()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&Transport::OnTimer,
- transport->weak_ptr_factory_for_timer_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(timeout_ms));
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&Transport::OnTimer,
+ transport->weak_ptr_factory_for_timer_.GetWeakPtr()),
+ base::TimeDelta::FromMilliseconds(timeout_ms));
}
return 0;
}