From dc9a67601b9d8c952bf399f0309519273f82bfd5 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Mon, 16 Aug 2010 07:13:53 +0000 Subject: Remove deprecated wstring Get(As)String() methods from Value, etc. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3117017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56187 0039d316-1c4b-4281-b951-d872f2087c98 --- base/values.cc | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'base/values.cc') diff --git a/base/values.cc b/base/values.cc index 7e348dc..cd2738b 100644 --- a/base/values.cc +++ b/base/values.cc @@ -119,13 +119,6 @@ bool Value::GetAsString(string16* out_value) const { return false; } -#if !defined(WCHAR_T_IS_UTF16) -// TODO(viettrungluu): Deprecated and to be removed: -bool Value::GetAsString(std::wstring* out_value) const { - return false; -} -#endif - Value* Value::DeepCopy() const { // This method should only be getting called for null Values--all subclasses // need to provide their own implementation;. @@ -254,15 +247,6 @@ bool StringValue::GetAsString(string16* out_value) const { return true; } -#if !defined(WCHAR_T_IS_UTF16) -// TODO(viettrungluu): Deprecated and to be removed: -bool StringValue::GetAsString(std::wstring* out_value) const { - if (out_value) - *out_value = UTF8ToWide(value_); - return true; -} -#endif - Value* StringValue::DeepCopy() const { return CreateStringValue(value_); } @@ -631,22 +615,6 @@ bool DictionaryValue::GetReal(const std::wstring& path, } // TODO(viettrungluu): Deprecated and to be removed: -bool DictionaryValue::GetString(const std::wstring& path, - std::string* out_value) const { - return GetString(WideToUTF8(path), out_value); -} - -// TODO(viettrungluu): Deprecated and to be removed: -bool DictionaryValue::GetString(const std::wstring& path, - std::wstring* out_value) const { - Value* value; - if (!Get(WideToUTF8(path), &value)) - return false; - - return value->GetAsString(out_value); -} - -// TODO(viettrungluu): Deprecated and to be removed: bool DictionaryValue::GetBinary(const std::wstring& path, BinaryValue** out_value) const { return GetBinary(WideToUTF8(path), out_value); @@ -985,17 +953,6 @@ bool ListValue::GetString(size_t index, string16* out_value) const { return value->GetAsString(out_value); } -#if !defined(WCHAR_T_IS_UTF16) -// TODO(viettrungluu): Deprecated and to be removed: -bool ListValue::GetString(size_t index, std::wstring* out_value) const { - Value* value; - if (!Get(index, &value)) - return false; - - return value->GetAsString(out_value); -} -#endif - bool ListValue::GetBinary(size_t index, BinaryValue** out_value) const { Value* value; bool result = Get(index, &value); -- cgit v1.1