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

Unified Diff: components/password_manager/core/browser/password_manager_client.h

Issue 866983003: GetLoginsRequest: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@324291_scopedvector
Patch Set: Fix Mac unittest Created 5 years, 10 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: components/password_manager/core/browser/password_manager_client.h
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h
index 2958932c832f25e4d781bb4e606e9a16cccfd897..97086a460a3e8629f8518f42e0fad22169502a45 100644
--- a/components/password_manager/core/browser/password_manager_client.h
+++ b/components/password_manager/core/browser/password_manager_client.h
@@ -6,6 +6,7 @@
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
#include "base/callback.h"
+#include "base/memory/scoped_vector.h"
#include "base/metrics/field_trial.h"
#include "components/autofill/core/common/password_form.h"
#include "components/password_manager/core/browser/password_store.h"
@@ -84,11 +85,9 @@ class PasswordManagerClient {
// Returns true if the prompt is indeed displayed. If the prompt is not
// displayed, returns false and does not call |callback|.
// |callback| should be invoked with the chosen form.
- // Note: The implementation takes ownership of all PasswordForms in
- // |local_forms| and |federated_forms|.
virtual bool PromptUserToChooseCredentials(
- const std::vector<autofill::PasswordForm*>& local_forms,
- const std::vector<autofill::PasswordForm*>& federated_forms,
+ ScopedVector<autofill::PasswordForm> local_forms,
+ ScopedVector<autofill::PasswordForm> federated_forms,
base::Callback<void(const CredentialInfo&)> callback) = 0;
// Called when a password is saved in an automated fashion. Embedder may

Powered by Google App Engine
This is Rietveld 408576698