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 12 matching lines...) Expand all Loading... |
23 // |keychain|, so the caller must make sure that the keychain outlives the | 23 // |keychain|, so the caller must make sure that the keychain outlives the |
24 // created object. | 24 // created object. |
25 explicit MacKeychainPasswordFormAdapter(const AppleKeychain* keychain); | 25 explicit MacKeychainPasswordFormAdapter(const AppleKeychain* keychain); |
26 | 26 |
27 // Returns PasswordForms for each keychain entry that could be used to fill | 27 // Returns PasswordForms for each keychain entry that could be used to fill |
28 // |form|. Caller is responsible for deleting the returned forms. | 28 // |form|. Caller is responsible for deleting the returned forms. |
29 std::vector<autofill::PasswordForm*> PasswordsFillingForm( | 29 std::vector<autofill::PasswordForm*> PasswordsFillingForm( |
30 const std::string& signon_realm, | 30 const std::string& signon_realm, |
31 autofill::PasswordForm::Scheme scheme); | 31 autofill::PasswordForm::Scheme scheme); |
32 | 32 |
33 // Returns the PasswordForm for the Keychain entry that matches |form| on all | 33 // Returns true if there is the Keychain entry that matches |query_form| on |
34 // of the fields that uniquely identify a Keychain item, or NULL if there is | 34 // all of the fields that uniquely identify a Keychain item. |
35 // no such entry. | 35 bool HasPasswordExactlyMatchingForm(const autofill::PasswordForm& query_form); |
36 // Caller is responsible for deleting the returned form. | |
37 autofill::PasswordForm* PasswordExactlyMatchingForm( | |
38 const autofill::PasswordForm& query_form); | |
39 | 36 |
40 // Returns true if the keychain contains any items that are mergeable with | 37 // Returns true if the keychain contains any items that are mergeable with |
41 // |query_form|. This is different from actually extracting the passwords | 38 // |query_form|. This is different from actually extracting the passwords |
42 // and checking the return count, since doing that would require reading the | 39 // and checking the return count, since doing that would require reading the |
43 // passwords from the keychain, thus potentially triggering authorizaiton UI, | 40 // passwords from the keychain, thus potentially triggering authorizaiton UI, |
44 // whereas this won't. | 41 // whereas this won't. |
45 bool HasPasswordsMergeableWithForm( | 42 bool HasPasswordsMergeableWithForm( |
46 const autofill::PasswordForm& query_form); | 43 const autofill::PasswordForm& query_form); |
47 | 44 |
48 // Returns all keychain items of types corresponding to password forms. | 45 // Returns all keychain items of types corresponding to password forms. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // in |item_form_pairs| that could be merged with |query_form|. | 210 // in |item_form_pairs| that could be merged with |query_form|. |
214 // Caller is responsible for deleting the returned forms. | 211 // Caller is responsible for deleting the returned forms. |
215 std::vector<autofill::PasswordForm*> ExtractPasswordsMergeableWithForm( | 212 std::vector<autofill::PasswordForm*> ExtractPasswordsMergeableWithForm( |
216 const AppleKeychain& keychain, | 213 const AppleKeychain& keychain, |
217 const std::vector<ItemFormPair>& item_form_pairs, | 214 const std::vector<ItemFormPair>& item_form_pairs, |
218 const autofill::PasswordForm& query_form); | 215 const autofill::PasswordForm& query_form); |
219 | 216 |
220 } // namespace internal_keychain_helpers | 217 } // namespace internal_keychain_helpers |
221 | 218 |
222 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 219 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
OLD | NEW |