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

Unified Diff: components/password_manager/core/browser/credential_manager_logger.h

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
Index: components/password_manager/core/browser/credential_manager_logger.h
diff --git a/components/password_manager/core/browser/credential_manager_logger.h b/components/password_manager/core/browser/credential_manager_logger.h
new file mode 100644
index 0000000000000000000000000000000000000000..c99f7f692a38e64bdc0327c6237e92a589ffb6c4
--- /dev/null
+++ b/components/password_manager/core/browser/credential_manager_logger.h
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_
+
+#include <vector>
+
+#include "base/macros.h"
+#include "components/password_manager/core/common/credential_manager_types.h"
+#include "url/gurl.h"
+
+namespace password_manager {
+
+class LogManager;
+
+// A helper for logging Credential Manager API calls to
+// chrome://password-manager-internals.
+class CredentialManagerLogger {
+ public:
+ explicit CredentialManagerLogger(const LogManager*);
+ ~CredentialManagerLogger();
+
+ void LogRequestCredential(const GURL& url,
+ bool zero_click_only,
+ const std::vector<GURL>& federations);
+ void LogSendCredential(const GURL& url, CredentialType type);
+ void LogStoreCredential(const GURL& url, CredentialType type);
+ void LogRequireUserMediation(const GURL& url);
+
+ private:
+ // The LogManager to which logs can be sent for display.
+ const LogManager* const log_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(CredentialManagerLogger);
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_

Powered by Google App Engine
This is Rietveld 408576698