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

Unified Diff: chrome/browser/dom_ui/dom_ui.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
Index: chrome/browser/dom_ui/dom_ui.cc
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 8d441b049a4a6e40a9d67ab8297e4a2095ae6b26..118e2620a931cb7ef423f7eb8935aa4046de4ad4 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -176,12 +176,13 @@ bool DOMMessageHandler::ExtractIntegerValue(const Value* value, int* out_int) {
return false;
}
+// TODO(viettrungluu): convert to string16 (or UTF-8 std::string?).
std::wstring DOMMessageHandler::ExtractStringValue(const Value* value) {
if (value && value->GetType() == Value::TYPE_LIST) {
const ListValue* list_value = static_cast<const ListValue*>(value);
- std::wstring wstring_value;
- if (list_value->GetString(0, &wstring_value))
- return wstring_value;
+ string16 string16_value;
+ if (list_value->GetString(0, &string16_value))
+ return UTF16ToWideHack(string16_value);
}
return std::wstring();
}
« no previous file with comments | « chrome/browser/dom_ui/core_options_handler.cc ('k') | chrome/browser/extensions/extension_bookmarks_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698