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

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

Issue 2293443002: Implement logging of the Credential Manager API calls to chrome://password-manager-internals. (Closed)
Patch Set: nits Created 4 years, 4 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 | « components/password_manager/core/common/credential_manager_types.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/common/credential_manager_types.cc
diff --git a/components/password_manager/core/common/credential_manager_types.cc b/components/password_manager/core/common/credential_manager_types.cc
index 484b2be7858403a418b1e2caa1ab90fb3958589f..068d3ac7bfba644369a31d54188036a39f192d84 100644
--- a/components/password_manager/core/common/credential_manager_types.cc
+++ b/components/password_manager/core/common/credential_manager_types.cc
@@ -5,20 +5,26 @@
#include "components/password_manager/core/common/credential_manager_types.h"
#include "base/logging.h"
+#include "base/strings/string_number_conversions.h"
#include "components/autofill/core/common/password_form.h"
namespace password_manager {
-std::ostream& operator<<(std::ostream& os, CredentialType value) {
+std::string CredentialTypeToString(CredentialType value) {
switch (value) {
case CredentialType::CREDENTIAL_TYPE_EMPTY:
- return os << "CredentialType::CREDENTIAL_TYPE_EMPTY";
+ return "CredentialType::CREDENTIAL_TYPE_EMPTY";
case CredentialType::CREDENTIAL_TYPE_PASSWORD:
- return os << "CredentialType::CREDENTIAL_TYPE_PASSWORD";
+ return "CredentialType::CREDENTIAL_TYPE_PASSWORD";
case CredentialType::CREDENTIAL_TYPE_FEDERATED:
- return os << "CredentialType::CREDENTIAL_TYPE_FEDERATED";
+ return "CredentialType::CREDENTIAL_TYPE_FEDERATED";
}
- return os << "Unknown CredentialType value: " << static_cast<int32_t>(value);
+ return "Unknown CredentialType value: " +
+ base::IntToString(static_cast<int>(value));
+}
+
+std::ostream& operator<<(std::ostream& os, CredentialType value) {
+ return os << CredentialTypeToString(value);
}
CredentialInfo::CredentialInfo() : type(CredentialType::CREDENTIAL_TYPE_EMPTY) {
« no previous file with comments | « components/password_manager/core/common/credential_manager_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698