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

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

Issue 1031253003: Move credential_manager_types.h to components/password_manager/core. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/core/common/credential_manager_types.cc
diff --git a/components/password_manager/content/common/credential_manager_types.cc b/components/password_manager/core/common/credential_manager_types.cc
similarity index 66%
rename from components/password_manager/content/common/credential_manager_types.cc
rename to components/password_manager/core/common/credential_manager_types.cc
index 36aa18a36eeb8b9ea2a1ddd1f6a12e91c424b212..cc43c52f2b8e433144e3346370d4d43817b7d178 100644
--- a/components/password_manager/content/common/credential_manager_types.cc
+++ b/components/password_manager/core/common/credential_manager_types.cc
@@ -2,37 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/password_manager/content/common/credential_manager_types.h"
+#include "components/password_manager/core/common/credential_manager_types.h"
#include "base/logging.h"
#include "components/autofill/core/common/password_form.h"
-#include "third_party/WebKit/public/platform/WebCredential.h"
-#include "third_party/WebKit/public/platform/WebFederatedCredential.h"
-#include "third_party/WebKit/public/platform/WebLocalCredential.h"
namespace password_manager {
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()
- ? 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();
- } else {
- DCHECK(credential.isFederatedCredential());
- federation = static_cast<const blink::WebFederatedCredential&>(credential)
- .federation();
- }
-}
-
CredentialInfo::CredentialInfo(const autofill::PasswordForm& form,
CredentialType form_type)
: type(form_type),

Powered by Google App Engine
This is Rietveld 408576698