diff options
author | hscham <hscham@chromium.org> | 2020-02-07 17:58:49 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-30 22:38:25 +0900 |
commit | 690d8d51a6aa5a1c71bfb2f8cb5a957c13be302e (patch) | |
tree | 942df9a9eeb4fc7f77ce9cc8e8ff81c895144977 | |
parent | e2e0f82d2ce199f17606c69b51b16b2d6793a433 (diff) | |
download | platform_external_libbrillo-690d8d51a6aa5a1c71bfb2f8cb5a957c13be302e.tar.gz platform_external_libbrillo-690d8d51a6aa5a1c71bfb2f8cb5a957c13be302e.tar.bz2 platform_external_libbrillo-690d8d51a6aa5a1c71bfb2f8cb5a957c13be302e.zip |
libbrillo: remove base::ValueReferenceAdapter
Was used for libchrome uprev migration.
BUG=chromium:909719
TEST=unit tests
Change-Id: Ic4558e170007a432c241ae9ae9093b222f191bca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2050213
Tested-by: Grace Cham <hscham@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Commit-Queue: Grace Cham <hscham@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/chromiumos/platform2
Cr-Mirrored-Commit: 401d60844eaf8b9b1f5ca2a72b599304dea178fe
-rw-r--r-- | brillo/value_conversion.h | 2 | ||||
-rw-r--r-- | policy/device_policy_impl.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/brillo/value_conversion.h b/brillo/value_conversion.h index 6cf7323..b0d61a1 100644 --- a/brillo/value_conversion.h +++ b/brillo/value_conversion.h @@ -74,7 +74,7 @@ bool FromValue(const base::Value& in_value, std::vector<T, Alloc>* out_value) { return false; out_value->clear(); out_value->reserve(list->GetSize()); - for (const base::Value& item : base::ValueReferenceAdapter(*list)) { + for (const base::Value& item : *list) { T value{}; if (!FromValue(item, &value)) return false; diff --git a/policy/device_policy_impl.cc b/policy/device_policy_impl.cc index 3f96d12..72d30b1 100644 --- a/policy/device_policy_impl.cc +++ b/policy/device_policy_impl.cc @@ -560,7 +560,7 @@ bool DevicePolicyImpl::GetDeviceUpdateStagingSchedule( if (!list_val) return false; - for (const auto& pair_value : base::ValueReferenceAdapter(*list_val)) { + for (const auto& pair_value : *list_val) { const base::DictionaryValue* day_percentage_pair; if (!pair_value.GetAsDictionary(&day_percentage_pair)) return false; @@ -654,7 +654,7 @@ bool DevicePolicyImpl::GetDisallowedTimeIntervals( if (!list_val) return false; - for (const auto& interval_value : base::ValueReferenceAdapter(*list_val)) { + for (const auto& interval_value : *list_val) { const base::DictionaryValue* interval_dict; if (!interval_value.GetAsDictionary(&interval_dict)) { LOG(ERROR) << "Invalid JSON string given. Interval is not a dict."; |