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

Unified Diff: chrome/renderer/web_apps.cc

Issue 2651543007: Use explicit WebString conversions in remaining chrome/renderer files (Closed)
Patch Set: Created 3 years, 11 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/renderer/web_apps.cc
diff --git a/chrome/renderer/web_apps.cc b/chrome/renderer/web_apps.cc
index 60d4a44b3cc11e2c81a8406ef2a830f964d84d81..9d7316c64a914659923b1de0353125af4b2f2234 100644
--- a/chrome/renderer/web_apps.cc
+++ b/chrome/renderer/web_apps.cc
@@ -167,9 +167,9 @@ void ParseWebAppFromWebDocument(WebFrame* frame,
std::string name = elem.getAttribute("name").utf8();
WebString content = elem.getAttribute("content");
if (name == "application-name") {
- app_info->title = content;
+ app_info->title = content.utf16();
} else if (name == "description") {
- app_info->description = content;
+ app_info->description = content.utf16();
} else if (name == "application-url") {
std::string url = content.utf8();
app_info->app_url = document_url.is_valid() ?
@@ -177,12 +177,10 @@ void ParseWebAppFromWebDocument(WebFrame* frame,
if (!app_info->app_url.is_valid())
app_info->app_url = GURL();
} else if (name == "mobile-web-app-capable" &&
- base::LowerCaseEqualsASCII(base::StringPiece16(content),
- "yes")) {
+ base::LowerCaseEqualsASCII(content.utf16(), "yes")) {
app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE;
} else if (name == "apple-mobile-web-app-capable" &&
- base::LowerCaseEqualsASCII(
- base::StringPiece16(content), "yes") &&
+ base::LowerCaseEqualsASCII(content.utf16(), "yes") &&
app_info->mobile_capable ==
WebApplicationInfo::MOBILE_CAPABLE_UNSPECIFIED) {
app_info->mobile_capable = WebApplicationInfo::MOBILE_CAPABLE_APPLE;
« no previous file with comments | « chrome/renderer/searchbox/searchbox_extension.cc ('k') | chrome/renderer/worker_content_settings_client_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698