OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/browser/autofill_scanner.h" | 5 #include "components/autofill/core/browser/autofill_scanner.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/autofill/browser/autofill_field.h" | 8 #include "components/autofill/core/browser/autofill_field.h" |
9 | 9 |
10 namespace autofill { | 10 namespace autofill { |
11 | 11 |
12 AutofillScanner::AutofillScanner( | 12 AutofillScanner::AutofillScanner( |
13 const std::vector<const AutofillField*>& fields) | 13 const std::vector<const AutofillField*>& fields) |
14 : cursor_(fields.begin()), | 14 : cursor_(fields.begin()), |
15 saved_cursor_(fields.begin()), | 15 saved_cursor_(fields.begin()), |
16 begin_(fields.begin()), | 16 begin_(fields.begin()), |
17 end_(fields.end()) { | 17 end_(fields.end()) { |
18 } | 18 } |
(...skipping 30 matching lines...) Expand all Loading... |
49 cursor_ = begin_ + index; | 49 cursor_ = begin_ + index; |
50 saved_cursor_ = end_; | 50 saved_cursor_ = end_; |
51 } | 51 } |
52 | 52 |
53 size_t AutofillScanner::SaveCursor() { | 53 size_t AutofillScanner::SaveCursor() { |
54 saved_cursor_ = cursor_; | 54 saved_cursor_ = cursor_; |
55 return static_cast<size_t>(cursor_ - begin_); | 55 return static_cast<size_t>(cursor_ - begin_); |
56 } | 56 } |
57 | 57 |
58 } // namespace autofill | 58 } // namespace autofill |
OLD | NEW |