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

Unified Diff: components/password_manager/core/browser/password_form_data.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: Second fix of the rebase 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_form_data.h
diff --git a/components/password_manager/core/browser/password_form_data.h b/components/password_manager/core/browser/password_form_data.h
index b91a763f9a24897ba33fe958d42484fe6c04082c..33ea01c7cbe2f549076569547ddcc690ebcc17f8 100644
--- a/components/password_manager/core/browser/password_form_data.h
+++ b/components/password_manager/core/browser/password_form_data.h
@@ -7,6 +7,7 @@
#include <ostream>
+#include "base/memory/scoped_ptr.h"
#include "components/autofill/core/common/password_form.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -31,23 +32,20 @@ struct PasswordFormData {
const double creation_time;
};
-// Creates and returns a new PasswordForm built from form_data. Caller is
-// responsible for deleting the object when finished with it.
-autofill::PasswordForm* CreatePasswordFormFromData(
+// Creates and returns a new PasswordForm built from form_data.
+scoped_ptr<autofill::PasswordForm> CreatePasswordFormFromData(
const PasswordFormData& form_data);
// Checks whether two vectors of PasswordForms contain equivalent elements,
// regardless of order.
+// TODO(vabr) The *Ptr suffix is obsolete, rename.
bool ContainsSamePasswordFormsPtr(
const std::vector<autofill::PasswordForm*>& first,
const std::vector<autofill::PasswordForm*>& second);
-bool ContainsSamePasswordForms(std::vector<autofill::PasswordForm>& first,
- std::vector<autofill::PasswordForm>& second);
-
// This gmock matcher is used to check that the |arg| contains exactly the same
// PasswordForms as |forms|, regardless of order.
-MATCHER_P(ContainsAllPasswordForms, forms, "") {
+MATCHER_P(ContainsSamePasswordForms, forms, "") {
return ContainsSamePasswordFormsPtr(forms, arg);
}

Powered by Google App Engine
This is Rietveld 408576698