summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/json/json_reader_unittest.cc24
-rw-r--r--base/values.cc13
-rw-r--r--base/values.h4
-rw-r--r--base/values_unittest.cc4
-rw-r--r--chrome/browser/background_contents_service.cc2
-rw-r--r--chrome/browser/background_contents_service_unittest.cc4
-rw-r--r--chrome/browser/geolocation/geolocation_content_settings_map.cc4
7 files changed, 17 insertions, 38 deletions
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc
index 71649df..c05fcda 100644
--- a/base/json/json_reader_unittest.cc
+++ b/base/json/json_reader_unittest.cc
@@ -302,10 +302,10 @@ TEST(JSONReaderTest, Reading) {
ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
DictionaryValue* dict_val = static_cast<DictionaryValue*>(root.get());
real_val = 0.0;
- ASSERT_TRUE(dict_val->GetReal(L"number", &real_val));
+ ASSERT_TRUE(dict_val->GetReal("number", &real_val));
ASSERT_DOUBLE_EQ(9.87654321, real_val);
Value* null_val = NULL;
- ASSERT_TRUE(dict_val->Get(L"null", &null_val));
+ ASSERT_TRUE(dict_val->Get("null", &null_val));
ASSERT_TRUE(null_val->IsType(Value::TYPE_NULL));
str_val.clear();
ASSERT_TRUE(dict_val->GetString(L"S", &str_val));
@@ -342,15 +342,15 @@ TEST(JSONReaderTest, Reading) {
ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
dict_val = static_cast<DictionaryValue*>(root.get());
DictionaryValue* inner_dict = NULL;
- ASSERT_TRUE(dict_val->GetDictionary(L"inner", &inner_dict));
+ ASSERT_TRUE(dict_val->GetDictionary("inner", &inner_dict));
ListValue* inner_array = NULL;
- ASSERT_TRUE(inner_dict->GetList(L"array", &inner_array));
+ ASSERT_TRUE(inner_dict->GetList("array", &inner_array));
ASSERT_EQ(1U, inner_array->GetSize());
bool_value = true;
- ASSERT_TRUE(dict_val->GetBoolean(L"false", &bool_value));
+ ASSERT_TRUE(dict_val->GetBoolean("false", &bool_value));
ASSERT_FALSE(bool_value);
inner_dict = NULL;
- ASSERT_TRUE(dict_val->GetDictionary(L"d", &inner_dict));
+ ASSERT_TRUE(dict_val->GetDictionary("d", &inner_dict));
root2.reset(JSONReader::Read(
"{\"inner\": {\"array\":[true] , },\"false\":false,\"d\":{},}", true));
@@ -363,15 +363,15 @@ TEST(JSONReaderTest, Reading) {
ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
dict_val = static_cast<DictionaryValue*>(root.get());
int integer_value = 0;
- EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion(L"a.b", &integer_value));
+ EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion("a.b", &integer_value));
EXPECT_EQ(3, integer_value);
- EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion(L"c", &integer_value));
+ EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion("c", &integer_value));
EXPECT_EQ(2, integer_value);
inner_dict = NULL;
- ASSERT_TRUE(dict_val->GetDictionaryWithoutPathExpansion(L"d.e.f",
+ ASSERT_TRUE(dict_val->GetDictionaryWithoutPathExpansion("d.e.f",
&inner_dict));
ASSERT_EQ(1U, inner_dict->size());
- EXPECT_TRUE(inner_dict->GetIntegerWithoutPathExpansion(L"g.h.i.j",
+ EXPECT_TRUE(inner_dict->GetIntegerWithoutPathExpansion("g.h.i.j",
&integer_value));
EXPECT_EQ(1, integer_value);
@@ -379,9 +379,9 @@ TEST(JSONReaderTest, Reading) {
ASSERT_TRUE(root.get());
ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
dict_val = static_cast<DictionaryValue*>(root.get());
- EXPECT_TRUE(dict_val->GetInteger(L"a.b", &integer_value));
+ EXPECT_TRUE(dict_val->GetInteger("a.b", &integer_value));
EXPECT_EQ(2, integer_value);
- EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion(L"a.b", &integer_value));
+ EXPECT_TRUE(dict_val->GetIntegerWithoutPathExpansion("a.b", &integer_value));
EXPECT_EQ(1, integer_value);
// Invalid, no closing brace
diff --git a/base/values.cc b/base/values.cc
index b2e276e..82fdbed 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -782,19 +782,6 @@ bool DictionaryValue::GetStringWithoutPathExpansion(
return value->GetAsString(out_value);
}
-// TODO(viettrungluu): Deprecated and to be removed:
-bool DictionaryValue::GetDictionaryWithoutPathExpansion(
- const std::wstring& key,
- DictionaryValue** out_value) const {
- return GetDictionaryWithoutPathExpansion(WideToUTF8(key), out_value);
-}
-
-// TODO(viettrungluu): Deprecated and to be removed:
-bool DictionaryValue::GetListWithoutPathExpansion(const std::wstring& key,
- ListValue** out_value) const {
- return GetListWithoutPathExpansion(WideToUTF8(key), out_value);
-}
-
bool DictionaryValue::Remove(const std::string& path, Value** out_value) {
DCHECK(IsStringUTF8(path));
std::string current_path(path);
diff --git a/base/values.h b/base/values.h
index 1fbc568..005db96 100644
--- a/base/values.h
+++ b/base/values.h
@@ -332,10 +332,6 @@ class DictionaryValue : public Value {
const std::wstring& key, std::string* out_value) const;
/*DEPRECATED*/bool GetStringWithoutPathExpansion(
const std::wstring& key, std::wstring* out_value) const;
- /*DEPRECATED*/bool GetDictionaryWithoutPathExpansion(
- const std::wstring& key, DictionaryValue** out_value) const;
- /*DEPRECATED*/bool GetListWithoutPathExpansion(const std::wstring& key,
- ListValue** out_value) const;
// Removes the Value with the specified path from this dictionary (or one
// of its child dictionaries, if the path is more than just a local key).
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index d71280d..82d6082 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -504,10 +504,6 @@ TEST_F(ValuesTest, DictionaryWithoutPathExpansionDeprecated) {
EXPECT_TRUE(dict.HasKey(L"this"));
Value* value1;
EXPECT_TRUE(dict.Get(L"this", &value1));
- DictionaryValue* value2;
- ASSERT_TRUE(dict.GetDictionaryWithoutPathExpansion(L"this", &value2));
- EXPECT_EQ(value1, value2);
- EXPECT_EQ(1U, value2->size());
EXPECT_TRUE(dict.HasKey(L"this.isnt.expanded"));
Value* value3;
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index f9eb6f2..6a61112 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -214,7 +214,7 @@ void BackgroundContentsService::RegisterBackgroundContents(
prefs::kRegisteredBackgroundContents);
const string16& appid = GetParentApplicationId(background_contents);
DictionaryValue* current;
- if (pref->GetDictionaryWithoutPathExpansion(UTF16ToWide(appid), &current))
+ if (pref->GetDictionaryWithoutPathExpansion(UTF16ToUTF8(appid), &current))
return;
// No entry for this application yet, so add one.
diff --git a/chrome/browser/background_contents_service_unittest.cc b/chrome/browser/background_contents_service_unittest.cc
index 292d0b0..964d111 100644
--- a/chrome/browser/background_contents_service_unittest.cc
+++ b/chrome/browser/background_contents_service_unittest.cc
@@ -38,9 +38,9 @@ class BackgroundContentsServiceTest : public testing::Test {
DictionaryValue* pref = GetPrefs(profile);
EXPECT_TRUE(pref->HasKey(UTF16ToWide(appid)));
DictionaryValue* value;
- pref->GetDictionaryWithoutPathExpansion(UTF16ToWide(appid), &value);
+ pref->GetDictionaryWithoutPathExpansion(UTF16ToUTF8(appid), &value);
std::string url;
- value->GetString(L"url", &url);
+ value->GetString("url", &url);
return url;
}
diff --git a/chrome/browser/geolocation/geolocation_content_settings_map.cc b/chrome/browser/geolocation/geolocation_content_settings_map.cc
index 597d408..b9e84dc5 100644
--- a/chrome/browser/geolocation/geolocation_content_settings_map.cc
+++ b/chrome/browser/geolocation/geolocation_content_settings_map.cc
@@ -67,7 +67,7 @@ ContentSetting GeolocationContentSettingsMap::GetContentSetting(
if (all_settings_dictionary != NULL) {
DictionaryValue* requesting_origin_settings;
if (all_settings_dictionary->GetDictionaryWithoutPathExpansion(
- UTF8ToWide(requesting_origin.spec()), &requesting_origin_settings)) {
+ requesting_origin.spec(), &requesting_origin_settings)) {
int setting;
if (requesting_origin_settings->GetIntegerWithoutPathExpansion(
UTF8ToWide(embedding_origin.spec()), &setting))
@@ -75,7 +75,7 @@ ContentSetting GeolocationContentSettingsMap::GetContentSetting(
// Check for any-embedder setting
if (requesting_origin != embedding_origin &&
requesting_origin_settings->GetIntegerWithoutPathExpansion(
- L"", &setting))
+ "", &setting))
return IntToContentSetting(setting);
}
}