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

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

Issue 7014011: Change heuristic regex and order to match grabber-continental. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 "chrome/browser/autofill/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 "chrome/browser/autofill/autofill_field.h"
9 9
10 AutofillScanner::AutofillScanner(const std::vector<AutofillField*>& fields) 10 AutofillScanner::AutofillScanner(const std::vector<AutofillField*>& fields)
(...skipping 21 matching lines...) Expand all
32 bool AutofillScanner::IsEnd() const { 32 bool AutofillScanner::IsEnd() const {
33 return cursor_ == end_; 33 return cursor_ == end_;
34 } 34 }
35 35
36 void AutofillScanner::Rewind() { 36 void AutofillScanner::Rewind() {
37 DCHECK(!saved_cursors_.empty()); 37 DCHECK(!saved_cursors_.empty());
38 cursor_ = saved_cursors_.back(); 38 cursor_ = saved_cursors_.back();
39 saved_cursors_.pop_back(); 39 saved_cursors_.pop_back();
40 } 40 }
41 41
42 void AutofillScanner::SaveCursor() { 42 void AutofillScanner::RewindTo(size_t position) {
43 saved_cursors_.resize(position);
44 cursor_ = saved_cursors_.back();
45 saved_cursors_.pop_back();
Ilya Sherman 2011/05/13 00:54:53 (See also the comment below) Let's instead have t
46 }
47
48 size_t AutofillScanner::SaveCursor() {
43 saved_cursors_.push_back(cursor_); 49 saved_cursors_.push_back(cursor_);
50 size_t index = saved_cursors_.size();
Ilya Sherman 2011/05/13 00:54:53 Let's instead have this be size_t index = cursor_
51 return index;
44 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698