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

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

Issue 106053008: [Mac] Passwords: Don't always prompt to access passwords saved by other browsers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another compile failure. Created 7 years 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.h
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index c1446705eeacdf58cf8b703941d83f121eeb3a0e..e3b45fd464b4190ee798b669f5b320292ce89f3a 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -49,6 +49,13 @@ class PasswordStore
void(Handle, const std::vector<autofill::PasswordForm*>&)>
GetLoginsCallback;
+ // Whether or not it's acceptable for Chrome to request access to locked
+ // passwords, which requires prompting the user for permission.
+ enum AuthorizationPromptPolicy {
+ ALLOW_PROMPT,
+ DISALLOW_PROMPT
+ };
+
// PasswordForm vector elements are meant to be owned by the
// PasswordStoreConsumer. However, if the request is canceled after the
// allocation, then the request must take care of the deletion.
@@ -107,9 +114,14 @@ class PasswordStore
// Searches for a matching PasswordForm and returns a ID so the async request
// can be tracked. Implement the PasswordStoreConsumer interface to be
- // notified on completion.
+ // notified on completion. |prompt_policy| indicates whether it's permissible
+ // to prompt the user to authorize access to locked passwords. This argument
+ // is only used on platforms that support prompting the user for access (such
+ // as Mac OS). NOTE: This means that this method can return different results
+ // depending on the value of |prompt_policy|.
virtual CancelableTaskTracker::TaskId GetLogins(
const autofill::PasswordForm& form,
+ AuthorizationPromptPolicy prompt_policy,
PasswordStoreConsumer* consumer);
// Gets the complete list of PasswordForms that are not blacklist entries--and
@@ -183,6 +195,7 @@ class PasswordStore
// (or not), the consumer should be notified.
virtual void GetLoginsImpl(
const autofill::PasswordForm& form,
+ AuthorizationPromptPolicy prompt_policy,
const ConsumerCallbackRunner& callback_runner) = 0;
// Finds all non-blacklist PasswordForms, and notifies the consumer.
« no previous file with comments | « chrome/browser/password_manager/password_manager_unittest.cc ('k') | chrome/browser/password_manager/password_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698