From 4dad9ad838f6671fbd67e1c5292525e739e31983 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Wed, 25 Nov 2009 20:47:52 +0000 Subject: Many changes to DictionaryValues: * Add support for keys with "." in them via new XXXWithoutPathExpansion() APIs. * Use these APIs with all key iterator usage. * SetXXX() calls cannot fail, so change them from bool to void. * Change GetSize() to size() since it's cheap, and add empty(). Other: * Use standard for loop format in more places (e.g. instead of while loops when they're really doing a for loop). * Shorten a few bits of code. BUG=567 TEST=none Review URL: http://codereview.chromium.org/441008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33109 0039d316-1c4b-4281-b951-d872f2087c98 --- base/json/json_reader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'base/json/json_reader.cc') diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index 06d790c..bdc682b 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc @@ -281,7 +281,8 @@ Value* JSONReader::BuildValue(bool is_root) { Value* dict_value = BuildValue(false); if (!dict_value) return NULL; - static_cast(node.get())->Set(dict_key, dict_value); + static_cast(node.get())->SetWithoutPathExpansion( + dict_key, dict_value); // After a key/value pair, we expect a comma or the end of the // object. -- cgit v1.1