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

Unified Diff: components/autofill/browser/autofill_scanner.cc

Issue 17392006: In components/autofill, move browser/ to core/browser/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix conflicts Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/autofill_scanner.cc
diff --git a/components/autofill/browser/autofill_scanner.cc b/components/autofill/browser/autofill_scanner.cc
deleted file mode 100644
index cad418c9fc328a59fec215e70f09faeed8f80d8f..0000000000000000000000000000000000000000
--- a/components/autofill/browser/autofill_scanner.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/autofill/browser/autofill_scanner.h"
-
-#include "base/logging.h"
-#include "components/autofill/browser/autofill_field.h"
-
-namespace autofill {
-
-AutofillScanner::AutofillScanner(
- const std::vector<const AutofillField*>& fields)
- : cursor_(fields.begin()),
- saved_cursor_(fields.begin()),
- begin_(fields.begin()),
- end_(fields.end()) {
-}
-
-AutofillScanner::~AutofillScanner() {
-}
-
-void AutofillScanner::Advance() {
- DCHECK(!IsEnd());
- ++cursor_;
-}
-
-const AutofillField* AutofillScanner::Cursor() const {
- if (IsEnd()) {
- NOTREACHED();
- return NULL;
- }
-
- return *cursor_;
-}
-
-bool AutofillScanner::IsEnd() const {
- return cursor_ == end_;
-}
-
-void AutofillScanner::Rewind() {
- DCHECK(saved_cursor_ != end_);
- cursor_ = saved_cursor_;
- saved_cursor_ = end_;
-}
-
-void AutofillScanner::RewindTo(size_t index) {
- DCHECK(index < static_cast<size_t>(end_ - begin_));
- cursor_ = begin_ + index;
- saved_cursor_ = end_;
-}
-
-size_t AutofillScanner::SaveCursor() {
- saved_cursor_ = cursor_;
- return static_cast<size_t>(cursor_ - begin_);
-}
-
-} // namespace autofill
« 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