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

Side by Side Diff: chrome/browser/password_manager/password_store_mac_internal.h

Issue 2818035: Don't re-store deleted passwords on form submit on the Mac (Closed)
Patch Set: Address comments Created 10 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 22 matching lines...) Expand all
33 std::vector<webkit_glue::PasswordForm*> PasswordsMergeableWithForm( 33 std::vector<webkit_glue::PasswordForm*> PasswordsMergeableWithForm(
34 const webkit_glue::PasswordForm& query_form); 34 const webkit_glue::PasswordForm& query_form);
35 35
36 // Returns the PasswordForm for the Keychain entry that matches |form| on all 36 // Returns the PasswordForm for the Keychain entry that matches |form| on all
37 // of the fields that uniquely identify a Keychain item, or NULL if there is 37 // of the fields that uniquely identify a Keychain item, or NULL if there is
38 // no such entry. 38 // no such entry.
39 // Caller is responsible for deleting the returned form. 39 // Caller is responsible for deleting the returned form.
40 webkit_glue::PasswordForm* PasswordExactlyMatchingForm( 40 webkit_glue::PasswordForm* PasswordExactlyMatchingForm(
41 const webkit_glue::PasswordForm& query_form); 41 const webkit_glue::PasswordForm& query_form);
42 42
43 // Returns true if PasswordsMergeableWithForm would return any items. This is
44 // a separate method because calling PasswordsMergeableWithForm and checking
45 // the return count would require reading the passwords from the keychain,
46 // thus potentially triggering authorizaiton UI, whereas this won't.
47 bool HasPasswordsMergeableWithForm(
48 const webkit_glue::PasswordForm& query_form);
49
43 // Returns all keychain items of types corresponding to password forms. 50 // Returns all keychain items of types corresponding to password forms.
44 std::vector<webkit_glue::PasswordForm*> GetAllPasswordFormPasswords(); 51 std::vector<webkit_glue::PasswordForm*> GetAllPasswordFormPasswords();
45 52
46 // Creates a new keychain entry from |form|, or updates the password of an 53 // Creates a new keychain entry from |form|, or updates the password of an
47 // existing keychain entry if there is a collision. Returns true if a keychain 54 // existing keychain entry if there is a collision. Returns true if a keychain
48 // entry was successfully added/updated. 55 // entry was successfully added/updated.
49 bool AddPassword(const webkit_glue::PasswordForm& form); 56 bool AddPassword(const webkit_glue::PasswordForm& form);
50 57
51 // Removes the keychain password matching |form| if any. Returns true if a 58 // Removes the keychain password matching |form| if any. Returns true if a
52 // keychain item was found and successfully removed. 59 // keychain item was found and successfully removed.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Fills in the passwords for as many of the forms in |database_forms| as 161 // Fills in the passwords for as many of the forms in |database_forms| as
155 // possible using entries from |keychain| and returns them. On return, 162 // possible using entries from |keychain| and returns them. On return,
156 // |database_forms| will contain only the forms for which no password was found. 163 // |database_forms| will contain only the forms for which no password was found.
157 std::vector<webkit_glue::PasswordForm*> GetPasswordsForForms( 164 std::vector<webkit_glue::PasswordForm*> GetPasswordsForForms(
158 const MacKeychain& keychain, 165 const MacKeychain& keychain,
159 std::vector<webkit_glue::PasswordForm*>* database_forms); 166 std::vector<webkit_glue::PasswordForm*>* database_forms);
160 167
161 } // internal_keychain_helpers 168 } // internal_keychain_helpers
162 169
163 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_ 170 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_INTERNAL_H_
OLDNEW
« 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