Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4157)

Unified Diff: chrome/browser/password_manager/password_store_mac_internal.h

Issue 2318303002: Remove stl_util's STLDeleteContainerPairSecondPointers. (Closed)
Patch Set: fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 52cbd000ea1b5cb18fac108763dd9a5bb8845fc9..e45742ae996772a7ba1096bd49f61a118ddf68b4 100644
--- a/chrome/browser/password_manager/password_store_mac_internal.h
+++ b/chrome/browser/password_manager/password_store_mac_internal.h
@@ -91,12 +91,12 @@ class MacKeychainPasswordFormAdapter {
// Changes the password for keychain_item to |password|; returns true if the
// password was successfully changed.
- bool SetKeychainItemPassword(const SecKeychainItemRef& keychain_item,
+ bool SetKeychainItemPassword(SecKeychainItemRef keychain_item,
const std::string& password);
// Sets the creator code of keychain_item to creator_code; returns true if the
// creator code was successfully set.
- bool SetKeychainItemCreatorCode(const SecKeychainItemRef& keychain_item,
+ bool SetKeychainItemCreatorCode(SecKeychainItemRef keychain_item,
OSType creator_code);
// Returns the creator code to be used for a Keychain search, depending on
@@ -117,7 +117,8 @@ class MacKeychainPasswordFormAdapter {
namespace internal_keychain_helpers {
// Pair of pointers to a SecKeychainItemRef and a corresponding PasswordForm.
-typedef std::pair<SecKeychainItemRef*, autofill::PasswordForm*> ItemFormPair;
+typedef std::pair<SecKeychainItemRef, std::unique_ptr<autofill::PasswordForm>>
+ ItemFormPair;
// 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. If
@@ -136,14 +137,14 @@ typedef std::pair<SecKeychainItemRef*, autofill::PasswordForm*> ItemFormPair;
// 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,
+ SecKeychainItemRef keychain_item,
autofill::PasswordForm* form,
bool extract_password_data);
// Returns true if |keychain_item| has the application-specific creator code in
// its attributes.
bool HasCreatorCode(const AppleKeychain& keychain,
- const SecKeychainItemRef& keychain_item);
+ SecKeychainItemRef keychain_item);
// Use FormMatchStrictness to configure which forms are considered a match by
// FormsMatchForMerge:
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/browser/password_manager/password_store_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698