| Index: components/autofill/core/browser/autofill_scanner.h
|
| diff --git a/components/autofill/core/browser/autofill_scanner.h b/components/autofill/core/browser/autofill_scanner.h
|
| index f30d5abcbc37ccd4fb9101f60a52b36bf124bf28..88b84e6fd943808df1c17d36fdf6f7f9cb100101 100644
|
| --- a/components/autofill/core/browser/autofill_scanner.h
|
| +++ b/components/autofill/core/browser/autofill_scanner.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <stddef.h>
|
|
|
| +#include <memory>
|
| #include <vector>
|
|
|
| #include "base/macros.h"
|
| @@ -20,6 +21,8 @@ class AutofillField;
|
| class AutofillScanner {
|
| public:
|
| explicit AutofillScanner(const std::vector<AutofillField*>& fields);
|
| + explicit AutofillScanner(
|
| + const std::vector<std::unique_ptr<AutofillField>>& fields);
|
| ~AutofillScanner();
|
|
|
| // Advances the cursor by one step, if possible.
|
| @@ -43,6 +46,8 @@ class AutofillScanner {
|
| size_t SaveCursor();
|
|
|
| private:
|
| + void Init(const std::vector<AutofillField*>& fields);
|
| +
|
| // Indicates the current position in the stream, represented as a vector.
|
| std::vector<AutofillField*>::const_iterator cursor_;
|
|
|
| @@ -50,10 +55,13 @@ class AutofillScanner {
|
| std::vector<AutofillField*>::const_iterator saved_cursor_;
|
|
|
| // The beginning pointer for the stream.
|
| - const std::vector<AutofillField*>::const_iterator begin_;
|
| + std::vector<AutofillField*>::const_iterator begin_;
|
|
|
| // The past-the-end pointer for the stream.
|
| - const std::vector<AutofillField*>::const_iterator end_;
|
| + std::vector<AutofillField*>::const_iterator end_;
|
| +
|
| + // The storage of non-owning pointers, used for the unique_ptr constructor.
|
| + std::vector<AutofillField*> non_owning_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AutofillScanner);
|
| };
|
|
|