diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-14 03:32:17 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-14 03:32:17 +0000 |
commit | 8b6e84a68798718a3dd66bc82bdbed50cff79f00 (patch) | |
tree | f69809fda4ad0423d8d5ac9d7f2030efbd8ab4f2 /base/json | |
parent | a60153f0ada9823286a54b8b8852526e3e21a5a1 (diff) | |
download | chromium_src-8b6e84a68798718a3dd66bc82bdbed50cff79f00.zip chromium_src-8b6e84a68798718a3dd66bc82bdbed50cff79f00.tar.gz chromium_src-8b6e84a68798718a3dd66bc82bdbed50cff79f00.tar.bz2 |
Remove deprecated wstring DictionaryValue::SetWithoutPathExpansion().
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3121017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/json')
-rw-r--r-- | base/json/json_reader.cc | 2 | ||||
-rw-r--r-- | base/json/json_writer_unittest.cc | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/base/json/json_reader.cc b/base/json/json_reader.cc index 0d6abc4..0818f93 100644 --- a/base/json/json_reader.cc +++ b/base/json/json_reader.cc @@ -295,7 +295,7 @@ Value* JSONReader::BuildValue(bool is_root) { return NULL; // Convert the key into a wstring. - std::wstring dict_key; + std::string dict_key; bool success = dict_key_value->GetAsString(&dict_key); DCHECK(success); diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc index e7d0f05..7d8db69 100644 --- a/base/json/json_writer_unittest.cc +++ b/base/json/json_writer_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -79,18 +79,18 @@ TEST(JSONWriterTest, Writing) { // Test keys with periods DictionaryValue period_dict; - period_dict.SetWithoutPathExpansion(L"a.b", Value::CreateIntegerValue(3)); - period_dict.SetWithoutPathExpansion(L"c", Value::CreateIntegerValue(2)); + period_dict.SetWithoutPathExpansion("a.b", Value::CreateIntegerValue(3)); + period_dict.SetWithoutPathExpansion("c", Value::CreateIntegerValue(2)); DictionaryValue* period_dict2 = new DictionaryValue; - period_dict2->SetWithoutPathExpansion(L"g.h.i.j", + period_dict2->SetWithoutPathExpansion("g.h.i.j", Value::CreateIntegerValue(1)); - period_dict.SetWithoutPathExpansion(L"d.e.f", period_dict2); + period_dict.SetWithoutPathExpansion("d.e.f", period_dict2); JSONWriter::Write(&period_dict, false, &output_js); ASSERT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js); DictionaryValue period_dict3; period_dict3.Set(L"a.b", Value::CreateIntegerValue(2)); - period_dict3.SetWithoutPathExpansion(L"a.b", Value::CreateIntegerValue(1)); + period_dict3.SetWithoutPathExpansion("a.b", Value::CreateIntegerValue(1)); JSONWriter::Write(&period_dict3, false, &output_js); ASSERT_EQ("{\"a\":{\"b\":2},\"a.b\":1}", output_js); } |