OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
7 | 7 |
8 #include <Security/Security.h> | 8 #include <Security/Security.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // | 132 // |
133 // If excessive prompting for access to other applications' keychain items | 133 // If excessive prompting for access to other applications' keychain items |
134 // becomes an issue, the password storage API will need to intially call this | 134 // becomes an issue, the password storage API will need to intially call this |
135 // function with |extract_password_data| set to false, and retrieve the password | 135 // function with |extract_password_data| set to false, and retrieve the password |
136 // later (accessing other fields doesn't require authorization). | 136 // later (accessing other fields doesn't require authorization). |
137 bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain, | 137 bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain, |
138 const SecKeychainItemRef& keychain_item, | 138 const SecKeychainItemRef& keychain_item, |
139 autofill::PasswordForm* form, | 139 autofill::PasswordForm* form, |
140 bool extract_password_data); | 140 bool extract_password_data); |
141 | 141 |
| 142 // Returns true if |keychain_item| has the application-specific creator code in |
| 143 // its attributes. |
| 144 bool HasCreatorCode(const AppleKeychain& keychain, |
| 145 const SecKeychainItemRef& keychain_item); |
| 146 |
142 // Use FormMatchStrictness to configure which forms are considered a match by | 147 // Use FormMatchStrictness to configure which forms are considered a match by |
143 // FormsMatchForMerge: | 148 // FormsMatchForMerge: |
144 enum FormMatchStrictness { | 149 enum FormMatchStrictness { |
145 STRICT_FORM_MATCH, // Match only forms with the same scheme, signon realm and | 150 STRICT_FORM_MATCH, // Match only forms with the same scheme, signon realm and |
146 // username value. | 151 // username value. |
147 FUZZY_FORM_MATCH, // Also match cases where the first form's | 152 FUZZY_FORM_MATCH, // Also match cases where the first form's |
148 // original_signon_realm is nonempty and matches the | 153 // original_signon_realm is nonempty and matches the |
149 // second form's signon_realm. | 154 // second form's signon_realm. |
150 }; | 155 }; |
151 | 156 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Returns PasswordForm instances populated with password data for each keychain | 212 // Returns PasswordForm instances populated with password data for each keychain |
208 // entry in |item_form_pairs| that could be merged with |query_form|. | 213 // entry in |item_form_pairs| that could be merged with |query_form|. |
209 ScopedVector<autofill::PasswordForm> ExtractPasswordsMergeableWithForm( | 214 ScopedVector<autofill::PasswordForm> ExtractPasswordsMergeableWithForm( |
210 const AppleKeychain& keychain, | 215 const AppleKeychain& keychain, |
211 const std::vector<ItemFormPair>& item_form_pairs, | 216 const std::vector<ItemFormPair>& item_form_pairs, |
212 const autofill::PasswordForm& query_form); | 217 const autofill::PasswordForm& query_form); |
213 | 218 |
214 } // namespace internal_keychain_helpers | 219 } // namespace internal_keychain_helpers |
215 | 220 |
216 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 221 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
OLD | NEW |