OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMON_CREDENTIAL_MANAGER_TYPES_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 15 matching lines...) Expand all Loading... |
26 // something reasonably sane. | 26 // something reasonably sane. |
27 const size_t kMaxFederations = 50u; | 27 const size_t kMaxFederations = 50u; |
28 | 28 |
29 enum class CredentialType { | 29 enum class CredentialType { |
30 CREDENTIAL_TYPE_EMPTY = 0, | 30 CREDENTIAL_TYPE_EMPTY = 0, |
31 CREDENTIAL_TYPE_PASSWORD, | 31 CREDENTIAL_TYPE_PASSWORD, |
32 CREDENTIAL_TYPE_FEDERATED, | 32 CREDENTIAL_TYPE_FEDERATED, |
33 CREDENTIAL_TYPE_LAST = CREDENTIAL_TYPE_FEDERATED | 33 CREDENTIAL_TYPE_LAST = CREDENTIAL_TYPE_FEDERATED |
34 }; | 34 }; |
35 | 35 |
| 36 enum class CredentialMediationRequirement { kSilent, kOptional, kRequired }; |
| 37 |
36 std::string CredentialTypeToString(CredentialType value); | 38 std::string CredentialTypeToString(CredentialType value); |
37 std::ostream& operator<<(std::ostream& os, CredentialType value); | 39 std::ostream& operator<<(std::ostream& os, CredentialType value); |
38 | 40 |
39 struct CredentialInfo { | 41 struct CredentialInfo { |
40 CredentialInfo(); | 42 CredentialInfo(); |
41 CredentialInfo(const autofill::PasswordForm& form, CredentialType form_type); | 43 CredentialInfo(const autofill::PasswordForm& form, CredentialType form_type); |
42 CredentialInfo(const CredentialInfo& other); | 44 CredentialInfo(const CredentialInfo& other); |
43 ~CredentialInfo(); | 45 ~CredentialInfo(); |
44 | 46 |
45 bool operator==(const CredentialInfo& rhs) const; | 47 bool operator==(const CredentialInfo& rhs) const; |
(...skipping 27 matching lines...) Expand all Loading... |
73 const GURL& origin); | 75 const GURL& origin); |
74 | 76 |
75 // Create a new autofill::PasswordForm object based on |origin|. The result | 77 // Create a new autofill::PasswordForm object based on |origin|. The result |
76 // plays the role of an observed form on that page. | 78 // plays the role of an observed form on that page. |
77 std::unique_ptr<autofill::PasswordForm> CreateObservedPasswordFormFromOrigin( | 79 std::unique_ptr<autofill::PasswordForm> CreateObservedPasswordFormFromOrigin( |
78 const GURL& origin); | 80 const GURL& origin); |
79 | 81 |
80 } // namespace password_manager | 82 } // namespace password_manager |
81 | 83 |
82 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ | 84 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |
OLD | NEW |