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

Side by Side Diff: components/autofill/browser/autofill_scanner.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/autofill/autofill_scanner.h" 5 #include "components/autofill/browser/autofill_scanner.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/autofill/autofill_field.h" 8 #include "components/autofill/browser/autofill_field.h"
9 9
10 AutofillScanner::AutofillScanner( 10 AutofillScanner::AutofillScanner(
11 const std::vector<const AutofillField*>& fields) 11 const std::vector<const AutofillField*>& fields)
12 : cursor_(fields.begin()), 12 : cursor_(fields.begin()),
13 saved_cursor_(fields.begin()), 13 saved_cursor_(fields.begin()),
14 begin_(fields.begin()), 14 begin_(fields.begin()),
15 end_(fields.end()) { 15 end_(fields.end()) {
16 } 16 }
17 17
18 AutofillScanner::~AutofillScanner() { 18 AutofillScanner::~AutofillScanner() {
(...skipping 26 matching lines...) Expand all
45 void AutofillScanner::RewindTo(size_t index) { 45 void AutofillScanner::RewindTo(size_t index) {
46 DCHECK(index < static_cast<size_t>(end_ - begin_)); 46 DCHECK(index < static_cast<size_t>(end_ - begin_));
47 cursor_ = begin_ + index; 47 cursor_ = begin_ + index;
48 saved_cursor_ = end_; 48 saved_cursor_ = end_;
49 } 49 }
50 50
51 size_t AutofillScanner::SaveCursor() { 51 size_t AutofillScanner::SaveCursor() {
52 saved_cursor_ = cursor_; 52 saved_cursor_ = cursor_;
53 return static_cast<size_t>(cursor_ - begin_); 53 return static_cast<size_t>(cursor_ - begin_);
54 } 54 }
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_scanner.h ('k') | components/autofill/browser/autofill_server_field_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698