OLD | NEW |
---|---|
1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/keychain_mac.h" | 15 #include "crypto/keychain_mac.h" |
16 | |
17 using crypto::MacKeychain; | |
16 | 18 |
17 // Adapter that wraps a MacKeychain and provides interaction in terms of | 19 // Adapter that wraps a MacKeychain and provides interaction in terms of |
18 // PasswordForms instead of Keychain items. | 20 // PasswordForms instead of Keychain items. |
19 class MacKeychainPasswordFormAdapter { | 21 class MacKeychainPasswordFormAdapter { |
20 public: | 22 public: |
21 // Creates an adapter for |keychain|. This class does not take ownership of | 23 // Creates an adapter for |keychain|. This class does not take ownership of |
22 // |keychain|, so the caller must make sure that the keychain outlives the | 24 // |keychain|, so the caller must make sure that the keychain outlives the |
23 // created object. | 25 // created object. |
24 explicit MacKeychainPasswordFormAdapter(const MacKeychain* keychain); | 26 explicit MacKeychainPasswordFormAdapter( |
27 const MacKeychain* keychain); | |
Ryan Sleevi
2012/03/16 20:58:37
Does this fit on one line?
akalin
2012/03/17 07:19:44
Done.
| |
25 | 28 |
26 // Returns PasswordForms for each keychain entry that could be used to fill | 29 // Returns PasswordForms for each keychain entry that could be used to fill |
27 // |form|. Caller is responsible for deleting the returned forms. | 30 // |form|. Caller is responsible for deleting the returned forms. |
28 std::vector<webkit::forms::PasswordForm*> PasswordsFillingForm( | 31 std::vector<webkit::forms::PasswordForm*> PasswordsFillingForm( |
29 const webkit::forms::PasswordForm& query_form); | 32 const webkit::forms::PasswordForm& query_form); |
30 | 33 |
31 // Returns PasswordForms for each keychain entry that could be merged with | 34 // Returns PasswordForms for each keychain entry that could be merged with |
32 // |form|. Differs from PasswordsFillingForm in that the username must match. | 35 // |form|. Differs from PasswordsFillingForm in that the username must match. |
33 // Caller is responsible for deleting the returned forms. | 36 // Caller is responsible for deleting the returned forms. |
34 std::vector<webkit::forms::PasswordForm*> PasswordsMergeableWithForm( | 37 std::vector<webkit::forms::PasswordForm*> PasswordsMergeableWithForm( |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 // Fills in the passwords for as many of the forms in |database_forms| as | 168 // Fills in the passwords for as many of the forms in |database_forms| as |
166 // possible using entries from |keychain| and returns them. On return, | 169 // possible using entries from |keychain| and returns them. On return, |
167 // |database_forms| will contain only the forms for which no password was found. | 170 // |database_forms| will contain only the forms for which no password was found. |
168 std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms( | 171 std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms( |
169 const MacKeychain& keychain, | 172 const MacKeychain& keychain, |
170 std::vector<webkit::forms::PasswordForm*>* database_forms); | 173 std::vector<webkit::forms::PasswordForm*>* database_forms); |
171 | 174 |
172 } // internal_keychain_helpers | 175 } // internal_keychain_helpers |
173 | 176 |
174 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 177 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
OLD | NEW |