| 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(const MacKeychain* keychain); |
| 25 | 27 |
| (...skipping 139 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 | 167 // 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, | 168 // possible using entries from |keychain| and returns them. On return, |
| 167 // |database_forms| will contain only the forms for which no password was found. | 169 // |database_forms| will contain only the forms for which no password was found. |
| 168 std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms( | 170 std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms( |
| 169 const MacKeychain& keychain, | 171 const MacKeychain& keychain, |
| 170 std::vector<webkit::forms::PasswordForm*>* database_forms); | 172 std::vector<webkit::forms::PasswordForm*>* database_forms); |
| 171 | 173 |
| 172 } // internal_keychain_helpers | 174 } // internal_keychain_helpers |
| 173 | 175 |
| 174 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ | 176 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ |
| OLD | NEW |