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

Unified Diff: components/password_manager/content/renderer/credential_manager_client.cc

Issue 2652233002: Use explicit WebString conversions in remaining components 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
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/content/renderer/credential_manager_client.cc
diff --git a/components/password_manager/content/renderer/credential_manager_client.cc b/components/password_manager/content/renderer/credential_manager_client.cc
index 24d26bcd078a041595c2bc727758b99a9043e3dc..bc8291f388655cf7c97b855fb1c28169c18b3b28 100644
--- a/components/password_manager/content/renderer/credential_manager_client.cc
+++ b/components/password_manager/content/renderer/credential_manager_client.cc
@@ -28,13 +28,14 @@ namespace {
void WebCredentialToCredentialInfo(const blink::WebCredential& credential,
CredentialInfo* out) {
- out->id = credential.id();
- out->name = credential.name();
+ out->id = credential.id().utf16();
+ out->name = credential.name().utf16();
out->icon = credential.iconURL();
if (credential.isPasswordCredential()) {
out->type = CredentialType::CREDENTIAL_TYPE_PASSWORD;
- out->password =
- static_cast<const blink::WebPasswordCredential&>(credential).password();
+ out->password = static_cast<const blink::WebPasswordCredential&>(credential)
+ .password()
+ .utf16();
} else {
DCHECK(credential.isFederatedCredential());
out->type = CredentialType::CREDENTIAL_TYPE_FEDERATED;
@@ -49,10 +50,13 @@ std::unique_ptr<blink::WebCredential> CredentialInfoToWebCredential(
switch (info.type) {
case CredentialType::CREDENTIAL_TYPE_FEDERATED:
return base::MakeUnique<blink::WebFederatedCredential>(
- info.id, info.federation, info.name, info.icon);
+ blink::WebString::fromUTF16(info.id), info.federation,
+ blink::WebString::fromUTF16(info.name), info.icon);
case CredentialType::CREDENTIAL_TYPE_PASSWORD:
return base::MakeUnique<blink::WebPasswordCredential>(
- info.id, info.password, info.name, info.icon);
+ blink::WebString::fromUTF16(info.id),
+ blink::WebString::fromUTF16(info.password),
+ blink::WebString::fromUTF16(info.name), info.icon);
case CredentialType::CREDENTIAL_TYPE_EMPTY:
return nullptr;
}
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698