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

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

Issue 1762603002: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add browsertests. Created 4 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.h
diff --git a/components/password_manager/core/common/credential_manager_types.h b/components/password_manager/core/common/credential_manager_types.h
index f798acff8af7dfb837f7f2ff40760cf55135ed7e..8f2a37eb2d97ed04042be6ed53278447f8c3eb31 100644
--- a/components/password_manager/core/common/credential_manager_types.h
+++ b/components/password_manager/core/common/credential_manager_types.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <ostream>
#include <string>
#include "base/compiler_specific.h"
@@ -31,6 +32,20 @@ enum class CredentialType {
CREDENTIAL_TYPE_LAST = CREDENTIAL_TYPE_FEDERATED
};
+inline std::ostream& operator<<(std::ostream& os, CredentialType value) {
vabr (Chromium) 2016/03/14 15:40:26 Please do not inline this, create a .cc file and p
leonhsl(Using Gerrit) 2016/03/16 07:07:28 Done. Moved the definition to credential_manager_t
+ switch (value) {
+ case CredentialType::CREDENTIAL_TYPE_EMPTY:
+ return os << "CredentialType::CREDENTIAL_TYPE_EMPTY";
+ case CredentialType::CREDENTIAL_TYPE_PASSWORD:
+ return os << "CredentialType::CREDENTIAL_TYPE_PASSWORD";
+ case CredentialType::CREDENTIAL_TYPE_FEDERATED:
+ return os << "CredentialType::CREDENTIAL_TYPE_FEDERATED";
+ default:
vabr (Chromium) 2016/03/14 15:40:26 nit: Move this from the default clause to below li
leonhsl(Using Gerrit) 2016/03/16 07:07:28 Done.
+ return os << "Unknown CredentialType value: "
+ << static_cast<int32_t>(value);
+ }
+}
+
struct CredentialInfo {
CredentialInfo();
CredentialInfo(const autofill::PasswordForm& form, CredentialType form_type);

Powered by Google App Engine
This is Rietveld 408576698