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

Unified Diff: content/child/blink_platform_impl.cc

Issue 2537953003: WebString: makes string16 conversions explicit (part 1: blink, content) (Closed)
Patch Set: fix Created 4 years 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 | « no previous file | content/child/browser_font_resource_trusted.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 86e22ad565885130419ba1724b03bd6c7af239e0..24c5fcb9e3023a242e81fff7f2f9449fa3019bf0 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -690,12 +690,14 @@ WebString BlinkPlatformImpl::queryLocalizedString(
int message_id = ToMessageID(name);
if (message_id < 0)
return WebString();
- return GetContentClient()->GetLocalizedString(message_id);
+ return WebString::fromUTF16(
+ GetContentClient()->GetLocalizedString(message_id));
}
WebString BlinkPlatformImpl::queryLocalizedString(
WebLocalizedString::Name name, int numeric_value) {
- return queryLocalizedString(name, base::IntToString16(numeric_value));
+ return queryLocalizedString(
+ name, WebString::fromUTF16(base::IntToString16(numeric_value)));
}
WebString BlinkPlatformImpl::queryLocalizedString(
@@ -703,8 +705,8 @@ WebString BlinkPlatformImpl::queryLocalizedString(
int message_id = ToMessageID(name);
if (message_id < 0)
return WebString();
- return base::ReplaceStringPlaceholders(
- GetContentClient()->GetLocalizedString(message_id), value, NULL);
+ return WebString::fromUTF16(base::ReplaceStringPlaceholders(
+ GetContentClient()->GetLocalizedString(message_id), value.utf16(), NULL));
}
WebString BlinkPlatformImpl::queryLocalizedString(
@@ -716,10 +718,10 @@ WebString BlinkPlatformImpl::queryLocalizedString(
return WebString();
std::vector<base::string16> values;
values.reserve(2);
- values.push_back(value1);
- values.push_back(value2);
- return base::ReplaceStringPlaceholders(
- GetContentClient()->GetLocalizedString(message_id), values, NULL);
+ values.push_back(value1.utf16());
+ values.push_back(value2.utf16());
+ return WebString::fromUTF16(base::ReplaceStringPlaceholders(
+ GetContentClient()->GetLocalizedString(message_id), values, NULL));
}
blink::WebThread* BlinkPlatformImpl::compositorThread() const {
« no previous file with comments | « no previous file | content/child/browser_font_resource_trusted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698