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

Unified Diff: base/values.cc

Issue 3033050: Rename DictionaryValue's SetStringFromUTF16() to SetString() (and overload). (Closed)
Patch Set: There shouldn't be wstrings in platform-ind. code. Created 10 years, 5 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 031e1caf1144232e2b9e7db17fef28eb03ccdb08..5c86d552cfefb9badfecbe3fa0001796e0bbec1b 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -448,8 +448,8 @@ void DictionaryValue::SetString(const std::string& path,
Set(path, CreateStringValue(in_value));
}
-void DictionaryValue::SetStringFromUTF16(const std::string& path,
- const string16& in_value) {
+void DictionaryValue::SetString(const std::string& path,
+ const string16& in_value) {
Set(path, CreateStringValue(in_value));
}
@@ -476,15 +476,17 @@ void DictionaryValue::SetString(const std::wstring& path,
// TODO(viettrungluu): Deprecated and to be removed:
void DictionaryValue::SetString(const std::wstring& path,
- const std::wstring& in_value) {
+ const string16& in_value) {
Set(path, CreateStringValue(in_value));
}
+#if !defined(WCHAR_T_IS_UTF16)
// TODO(viettrungluu): Deprecated and to be removed:
-void DictionaryValue::SetStringFromUTF16(const std::wstring& path,
- const string16& in_value) {
+void DictionaryValue::SetString(const std::wstring& path,
+ const std::wstring& in_value) {
Set(path, CreateStringValue(in_value));
}
+#endif
void DictionaryValue::SetWithoutPathExpansion(const std::string& key,
Value* in_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