Chromium Code Reviews| 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..5230ea6b4dc075ee104eff11a77cb3e05be1ddc5 |
| --- /dev/null |
| +++ b/components/password_manager/core/browser/credential_manager_logger.h |
| @@ -0,0 +1,40 @@ |
| +// 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 |
|
vabr (Chromium)
2016/08/29 13:10:44
nit: Should there be a blank line between 39 and 4
vasilii
2016/08/29 15:12:39
Done.
|
| +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ |