summaryrefslogtreecommitdiffstats
path: root/components/autofill/browser/autocheckout_page_meta_data.cc
blob: aa48ca71b0f8080f52eb716a26d7204a115a8b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2013 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/autocheckout_page_meta_data.h"

namespace autofill {

AutocheckoutPageMetaData::AutocheckoutPageMetaData()
    : current_page_number(-1),
      total_pages(-1) {}

AutocheckoutPageMetaData::~AutocheckoutPageMetaData() {}

bool AutocheckoutPageMetaData::IsStartOfAutofillableFlow() const {
  return current_page_number == 0 && total_pages > 0;
}

bool AutocheckoutPageMetaData::IsInAutofillableFlow() const {
  return current_page_number >= 0 && current_page_number < total_pages;
}

bool AutocheckoutPageMetaData::IsEndOfAutofillableFlow() const {
  return total_pages > 0 && current_page_number == total_pages - 1;
}

}  // namesapce autofill