Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3940)

Unified Diff: base/values.cc

Issue 3117017: Remove deprecated wstring Get(As)String() methods from Value, etc. (Closed)
Patch Set: fix win Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index 7e348dc13d8b76633a039ee682aa957e55491a41..cd2738b8af4ca8ad7f86f9886e7dfa0bbd003f13 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);
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698