OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/password_manager/core/common/credential_manager_types.h" | 11 #include "components/password_manager/core/common/credential_manager_types.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace password_manager { | 14 namespace password_manager { |
15 | 15 |
16 class LogManager; | 16 class LogManager; |
17 | 17 |
18 // A helper for logging Credential Manager API calls to | 18 // A helper for logging Credential Manager API calls to |
19 // chrome://password-manager-internals. | 19 // chrome://password-manager-internals. |
20 class CredentialManagerLogger { | 20 class CredentialManagerLogger { |
21 public: | 21 public: |
22 explicit CredentialManagerLogger(const LogManager*); | 22 explicit CredentialManagerLogger(const LogManager*); |
23 ~CredentialManagerLogger(); | 23 ~CredentialManagerLogger(); |
24 | 24 |
25 void LogRequestCredential(const GURL& url, | 25 void LogRequestCredential(const GURL& url, |
26 bool zero_click_only, | 26 CredentialMediationRequirement mediation, |
27 const std::vector<GURL>& federations); | 27 const std::vector<GURL>& federations); |
28 void LogSendCredential(const GURL& url, CredentialType type); | 28 void LogSendCredential(const GURL& url, CredentialType type); |
29 void LogStoreCredential(const GURL& url, CredentialType type); | 29 void LogStoreCredential(const GURL& url, CredentialType type); |
30 void LogRequireUserMediation(const GURL& url); | 30 void LogRequireUserMediation(const GURL& url); |
31 | 31 |
32 private: | 32 private: |
33 // The LogManager to which logs can be sent for display. | 33 // The LogManager to which logs can be sent for display. |
34 const LogManager* const log_manager_; | 34 const LogManager* const log_manager_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(CredentialManagerLogger); | 36 DISALLOW_COPY_AND_ASSIGN(CredentialManagerLogger); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace password_manager | 39 } // namespace password_manager |
40 | 40 |
41 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ | 41 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_LOGGER_H_ |
OLD | NEW |