update_engine: changes for libchrome r680000 uprev
Changes applied include:
Replace arraysize by base::size.
Replace base::MessageLoop::current()->task_runner by
base::ThreadTaskRunnerHandle::Get, and
base::MessageLoopForIO::current by base::MessageLoopCurrent::IsSet.
Remove use of base::ContainsKey.
Replace base::Int{,64}ToString by base::NumberTostring.
The changes are all compatible with current libchrome r576279.
BUG=chromium:1054279
TEST=unittest
Change-Id: Ibb6027a5070e0e2d4554a6684350168542fedf5e
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2065691
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Qijiang Fan <fqj@google.com>
Commit-Queue: Qijiang Fan <fqj@google.com>
diff --git a/common/cpu_limiter.cc b/common/cpu_limiter.cc
index 1d14764..5f1ae6f 100644
--- a/common/cpu_limiter.cc
+++ b/common/cpu_limiter.cc
@@ -67,7 +67,7 @@
if (shares_ == shares)
return true;
- std::string string_shares = base::IntToString(static_cast<int>(shares));
+ std::string string_shares = base::NumberToString(static_cast<int>(shares));
LOG(INFO) << "Setting cgroup cpu shares to " << string_shares;
if (!utils::WriteFile(
kCGroupSharesPath, string_shares.c_str(), string_shares.size())) {