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 --- ipc/ipc_message_utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc index acb2452..464dd26 100644 --- a/ipc/ipc_message_utils.cc +++ b/ipc/ipc_message_utils.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -61,12 +61,12 @@ static void WriteValue(Message* m, const Value* value, int recursion) { case Value::TYPE_DICTIONARY: { const DictionaryValue* dict = static_cast(value); - WriteParam(m, static_cast(dict->GetSize())); + WriteParam(m, static_cast(dict->size())); for (DictionaryValue::key_iterator it = dict->begin_keys(); it != dict->end_keys(); ++it) { Value* subval; - if (dict->Get(*it, &subval)) { + if (dict->GetWithoutPathExpansion(*it, &subval)) { WriteParam(m, *it); WriteValue(m, subval, recursion + 1); } else { -- cgit v1.1