summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/values.h')
-rw-r--r--base/values.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/values.h b/base/values.h
index 82a29fd..1bbc581 100644
--- a/base/values.h
+++ b/base/values.h
@@ -287,6 +287,10 @@ class DictionaryValue : public Value {
// to be used as paths.
bool RemoveWithoutPathExpansion(const std::wstring& key, Value** out_value);
+ // Makes a copy of |this| but doesn't include empty dictionaries and lists in
+ // the copy. This never returns NULL, even if |this| itself is empty.
+ DictionaryValue* DeepCopyWithoutEmptyChildren();
+
// This class provides an iterator for the keys in the dictionary.
// It can't be used to modify the dictionary.
//
@@ -331,6 +335,9 @@ class ListValue : public Value {
// Returns the number of Values in this list.
size_t GetSize() const { return list_.size(); }
+ // Returns whether the list is empty.
+ bool empty() const { return list_.empty(); }
+
// Sets the list item at the given index to be the Value specified by
// the value given. If the index beyond the current end of the list, null
// Values will be used to pad out the list.