Add Dictionary API to base::Value

Desktop / Chromium - jdoerrie [chromium.org] - 14 July 2017 04:47 EDT

This change introduces |FindKey|, |FindKeyOfType|, |SetKey|, |DictEnd| and |DictItems| to base::Value. These methods are part of the new API proposal and abstract away the pointer based underlying storage of Dictionary Values.

Bug: 646113 Change-Id: I09150f3b2fd47e24074caa50a30a058fc4f558a7 Reviewed-on: https://chromium-review.googlesource.com/561682 Commit-Queue: Jan Wilken Dörrie

37c3e0b Add Dictionary API to base::Value
base/BUILD.gn | 3 +
base/value_iterators.cc | 228 ++++++++++++++++++++++++++
base/value_iterators.h | 194 ++++++++++++++++++++++
base/value_iterators_unittest.cc | 345 +++++++++++++++++++++++++++++++++++++++
base/values.cc | 93 +++++++++++
base/values.h | 54 ++++++
base/values_unittest.cc | 309 ++++++++++++++++++++++++++++++-----
7 files changed, 1189 insertions(+), 37 deletions(-)

Upstream: git.chromium.org


  • Share