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

Unified Diff: components/autofill/core/browser/form_structure.h

Issue 2611453002: Remove ScopedVector from autofill::FormStructure (Closed)
Patch Set: Fix ios build Created 3 years, 12 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/autofill/core/browser/form_structure.h
diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h
index 54288a716b5d73b8181757893c6cc3496facbb02..9c8501b78ee1a131b54b17d6a02b5630e32b02d1 100644
--- a/components/autofill/core/browser/form_structure.h
+++ b/components/autofill/core/browser/form_structure.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <memory>
#include <set>
#include <string>
#include <vector>
@@ -14,7 +15,6 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "components/autofill/core/browser/autofill_field.h"
@@ -188,11 +188,11 @@ class FormStructure {
size_t autofill_count() const { return autofill_count_; }
// Used for iterating over the fields.
- std::vector<AutofillField*>::const_iterator begin() const {
- return fields_.begin();
+ std::vector<std::unique_ptr<AutofillField>>::const_iterator begin() const {
+ return fields_.cbegin();
}
- std::vector<AutofillField*>::const_iterator end() const {
- return fields_.end();
+ std::vector<std::unique_ptr<AutofillField>>::const_iterator end() const {
+ return fields_.cend();
}
const base::string16& form_name() const { return form_name_; }
@@ -274,7 +274,7 @@ class FormStructure {
size_t autofill_count_;
// A vector of all the input fields in the form.
- ScopedVector<AutofillField> fields_;
+ std::vector<std::unique_ptr<AutofillField>> fields_;
// The number of fields that are part of the form signature and that are
// included in queries to the Autofill server.
« no previous file with comments | « components/autofill/core/browser/form_field_unittest.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698