summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/billing_address.h
blob: 79cd90e59f939422d7dbea029ce238493ee72cd0 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2010 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.

#ifndef CHROME_BROWSER_AUTOFILL_BILLING_ADDRESS_H_
#define CHROME_BROWSER_AUTOFILL_BILLING_ADDRESS_H_

#include "chrome/browser/autofill/address.h"
#include "chrome/browser/autofill/field_types.h"

class FormGroup;

// A specialization of Address that identifies itself as a billing address.
class BillingAddress : public Address {
 public:
  BillingAddress() {}
  FormGroup* Clone() const { return new BillingAddress(*this); }

 protected:
  virtual AutoFillFieldType GetLine1Type() const {
    return ADDRESS_BILLING_LINE1;
  }

  virtual AutoFillFieldType GetLine2Type() const {
    return ADDRESS_BILLING_LINE2;
  }

  virtual AutoFillFieldType GetAptNumType() const {
    return ADDRESS_BILLING_APT_NUM;
  }

  virtual AutoFillFieldType GetCityType() const {
    return ADDRESS_BILLING_CITY;
  }

  virtual AutoFillFieldType GetStateType() const {
    return ADDRESS_BILLING_STATE;
  }

  virtual AutoFillFieldType GetZipCodeType() const {
    return ADDRESS_BILLING_ZIP;
  }

  virtual AutoFillFieldType GetCountryType() const {
    return ADDRESS_BILLING_COUNTRY;
  }

 private:
  explicit BillingAddress(const BillingAddress& address) : Address(address) {}
  void operator=(const BillingAddress& address);  // Not implemented.
};

#endif  // CHROME_BROWSER_AUTOFILL_BILLING_ADDRESS_H_