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

Unified Diff: components/password_manager/content/common/credential_manager_types.cc

Issue 835523004: Credential Manager API: Enable forward declaration for CredentialType enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: components/password_manager/content/common/credential_manager_types.cc
diff --git a/components/password_manager/content/common/credential_manager_types.cc b/components/password_manager/content/common/credential_manager_types.cc
index 61e4bca3fa10bad5f30e7fef874ada93ec76085a..afbc7e41aeed7ab3543a79089d62d9ef8091ed65 100644
--- a/components/password_manager/content/common/credential_manager_types.cc
+++ b/components/password_manager/content/common/credential_manager_types.cc
@@ -12,16 +12,17 @@
namespace password_manager {
-CredentialInfo::CredentialInfo() : type(CREDENTIAL_TYPE_EMPTY) {
+CredentialInfo::CredentialInfo() : type(CredentialType::CREDENTIAL_TYPE_EMPTY) {
}
CredentialInfo::CredentialInfo(const blink::WebCredential& credential)
: id(credential.id()),
name(credential.name()),
avatar(credential.avatarURL()) {
- type = credential.isLocalCredential() ? CREDENTIAL_TYPE_LOCAL
- : CREDENTIAL_TYPE_FEDERATED;
- if (type == CREDENTIAL_TYPE_LOCAL) {
+ type = credential.isLocalCredential()
+ ? CredentialType::CREDENTIAL_TYPE_LOCAL
+ : CredentialType::CREDENTIAL_TYPE_FEDERATED;
+ if (type == CredentialType::CREDENTIAL_TYPE_LOCAL) {
DCHECK(credential.isLocalCredential());
password = static_cast<const blink::WebLocalCredential&>(
credential).password();
@@ -39,7 +40,8 @@ CredentialInfo::CredentialInfo(const autofill::PasswordForm& form)
password(form.password_value),
federation(form.federation_url) {
DCHECK(!password.empty() || !federation.is_empty());
- type = password.empty() ? CREDENTIAL_TYPE_FEDERATED : CREDENTIAL_TYPE_LOCAL;
+ type = password.empty() ? CredentialType::CREDENTIAL_TYPE_FEDERATED
+ : CredentialType::CREDENTIAL_TYPE_LOCAL;
}
CredentialInfo::~CredentialInfo() {

Powered by Google App Engine
This is Rietveld 408576698