Index: chrome/browser/password_manager/password_store_mac_internal.h |
diff --git a/chrome/browser/password_manager/password_store_mac_internal.h b/chrome/browser/password_manager/password_store_mac_internal.h |
index b7a2be49fca5dc1a7871226addcef97f36ee4821..ebaa24dea9e0c22fab611167d20475f2e4459041 100644 |
--- a/chrome/browser/password_manager/password_store_mac_internal.h |
+++ b/chrome/browser/password_manager/password_store_mac_internal.h |
@@ -49,6 +49,10 @@ class MacKeychainPasswordFormAdapter { |
const content::PasswordForm& query_form); |
// Returns all keychain items of types corresponding to password forms. |
+ std::vector<SecKeychainItemRef> GetAllPasswordFormKeychainItems(); |
+ |
+ // Returns password data from all keychain items of types corresponding to |
+ // password forms. Caller is responsible for deleting the returned forms. |
std::vector<content::PasswordForm*> GetAllPasswordFormPasswords(); |
// Creates a new keychain entry from |form|, or updates the password of an |
@@ -129,19 +133,23 @@ class MacKeychainPasswordFormAdapter { |
namespace internal_keychain_helpers { |
// Sets the fields of |form| based on the keychain data from |keychain_item|. |
-// Fields that can't be determined from |keychain_item| will be unchanged. |
+// Fields that can't be determined from |keychain_item| will be unchanged. If |
+// |extract_password_data| is true, the password data will be copied from |
+// |keychain_item| in addition to its attributes. If it is false, only the |
+// password attributes will be copied. |
// |
-// IMPORTANT: This function can cause the OS to trigger UI (to allow access to |
-// the keychain item if we aren't trusted for the item), and block until the UI |
-// is dismissed. |
+// IMPORTANT: If |extract_password_data| is true, this function can cause the OS |
+// to trigger UI (to allow access to the keychain item if we aren't trusted for |
+// the item), and block until the UI is dismissed. |
// |
// If excessive prompting for access to other applications' keychain items |
-// becomes an issue, the password storage API will need to be refactored to |
-// allow the password to be retrieved later (accessing other fields doesn't |
-// require authorization). |
+// becomes an issue, the password storage API will need to intially call this |
+// function with |extract_password_data| set to false, and retrieve the password |
+// later (accessing other fields doesn't require authorization). |
bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain, |
const SecKeychainItemRef& keychain_item, |
- content::PasswordForm* form); |
+ content::PasswordForm* form, |
+ bool extract_password_data); |
// Returns true if the two given forms match based on signon_reaml, scheme, and |
// username_value, and are thus suitable for merging (see MergePasswordForms). |