Chromium Code Reviews| 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..258eebc8c9b5d10596b10ff671c52199e6be01c8 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" |
| @@ -46,6 +46,8 @@ struct FormDataPredictions; |
| // in the fields along with additional information needed by Autofill. |
| class FormStructure { |
| public: |
| + using FieldsVector = std::vector<std::unique_ptr<AutofillField>>; |
|
vabr (Chromium)
2017/01/02 08:30:21
nit: I'm not completely sure if this alias is help
Avi (use Gerrit)
2017/01/02 20:32:03
Done.
|
| + |
| explicit FormStructure(const FormData& form); |
| virtual ~FormStructure(); |
| @@ -188,12 +190,8 @@ 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<AutofillField*>::const_iterator end() const { |
| - return fields_.end(); |
| - } |
| + FieldsVector::const_iterator begin() const { return fields_.begin(); } |
| + FieldsVector::const_iterator end() const { return fields_.end(); } |
| const base::string16& form_name() const { return form_name_; } |
| @@ -274,7 +272,7 @@ class FormStructure { |
| size_t autofill_count_; |
| // A vector of all the input fields in the form. |
| - ScopedVector<AutofillField> fields_; |
| + FieldsVector fields_; |
| // The number of fields that are part of the form signature and that are |
| // included in queries to the Autofill server. |