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

Unified Diff: ios/web/web_state/js/credential_util.mm

Issue 1162583003: Credential Management: Rename 'LocalCredential' to 'PasswordCredential' (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drop
Patch Set: Fix. Created 5 years, 7 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 | « ios/web/web_state/js/credential_util.h ('k') | ios/web/web_state/js/credential_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/credential_util.mm
diff --git a/ios/web/web_state/js/credential_util.mm b/ios/web/web_state/js/credential_util.mm
index 9de786f77a7c8263a9e9d1555cc4736ab67b33c6..d0a9b4a1636d237f1651917ce8f9d85720332308 100644
--- a/ios/web/web_state/js/credential_util.mm
+++ b/ios/web/web_state/js/credential_util.mm
@@ -13,8 +13,8 @@
namespace {
-// "type" value for a DictionaryValue representation of LocalCredential.
-const char* kLocalCredentialType = "LocalCredential";
+// "type" value for a DictionaryValue representation of PasswordCredential.
+const char* kPasswordCredentialType = "PasswordCredential";
// "type" value for a DictionaryValue representation of FederatedCredential.
const char* kFederatedCredentialType = "FederatedCredential";
@@ -31,8 +31,8 @@ bool DictionaryValueToCredential(const base::DictionaryValue& value,
if (!value.GetString("type", &type))
return false;
CredentialType credential_type;
- if (type == base::ASCIIToUTF16(kLocalCredentialType))
- credential_type = CredentialType::CREDENTIAL_TYPE_LOCAL;
+ if (type == base::ASCIIToUTF16(kPasswordCredentialType))
+ credential_type = CredentialType::CREDENTIAL_TYPE_PASSWORD;
else if (type == base::ASCIIToUTF16(kFederatedCredentialType))
credential_type = CredentialType::CREDENTIAL_TYPE_FEDERATED;
else
@@ -54,7 +54,7 @@ bool DictionaryValueToCredential(const base::DictionaryValue& value,
}
base::string16 password;
- if (credential_type == CredentialType::CREDENTIAL_TYPE_LOCAL &&
+ if (credential_type == CredentialType::CREDENTIAL_TYPE_PASSWORD &&
!value.GetString("password", &password)) {
return false;
}
@@ -87,8 +87,8 @@ void CredentialToDictionaryValue(const Credential& credential,
// the JavaScript Promise resolver.
value->Clear();
return;
- case CredentialType::CREDENTIAL_TYPE_LOCAL:
- value->SetString("type", kLocalCredentialType);
+ case CredentialType::CREDENTIAL_TYPE_PASSWORD:
+ value->SetString("type", kPasswordCredentialType);
value->SetString("password", credential.password);
break;
case CredentialType::CREDENTIAL_TYPE_FEDERATED:
« no previous file with comments | « ios/web/web_state/js/credential_util.h ('k') | ios/web/web_state/js/credential_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698