| Index: chrome/browser/autofill/wallet/wallet_address.h
|
| diff --git a/chrome/browser/autofill/wallet/wallet_address.h b/chrome/browser/autofill/wallet/wallet_address.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2e36face654296b429a108a337c61143f2cb76c5
|
| --- /dev/null
|
| +++ b/chrome/browser/autofill/wallet/wallet_address.h
|
| @@ -0,0 +1,96 @@
|
| +// Copyright (c) 2012 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_WALLET_WALLET_ADDRESS_H_
|
| +#define CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| +namespace wallet {
|
| +
|
| +class Address {
|
| + public:
|
| + Address();
|
| + // TODO(ahutter): do we need descriptive_name, is_post_box,
|
| + // is_minimal_address, is_valid, or is_default
|
| + Address(const std::string& country_name_code,
|
| + const std::string& recipient_name,
|
| + const std::string& address_line_1,
|
| + const std::string& address_line_2,
|
| + const std::string& locality_name,
|
| + const std::string& administrative_area_name,
|
| + const std::string& postal_code_number,
|
| + const std::string& phone_number,
|
| + const std::string& object_id);
|
| + ~Address();
|
| + const std::string GetCountryNameCode() const { return country_name_code_; }
|
| + const std::string GetRecipientName() const { return recipient_name_; }
|
| + const std::string GetAddressLine1() const { return address_line_1_; }
|
| + const std::string GetAddressLine2() const { return address_line_2_; }
|
| + const std::string GetLocalityName() const { return locality_name_; }
|
| + const std::string GetAdminAreaName() const {
|
| + return administrative_area_name_;
|
| + }
|
| + const std::string GetPostalCodeNumber() const { return postal_code_number_; }
|
| + const std::string GetPhoneNumber() const { return phone_number_; }
|
| + const std::string GetObjectId() const { return object_id_; }
|
| +
|
| + void SetCountryNameCode(const std::string& country_name_code) {
|
| + country_name_code_ = country_name_code;
|
| + }
|
| + void SetRecipientName(const std::string& recipient_name) {
|
| + recipient_name_ = recipient_name;
|
| + }
|
| + void SetAddressLine1(const std::string& address_line_1) {
|
| + address_line_1_ = address_line_1;
|
| + }
|
| + void SetAddressLine2(const std::string& address_line_2) {
|
| + address_line_2_ = address_line_2;
|
| + }
|
| + void SetLocalityName(const std::string& locality_name) {
|
| + locality_name_ = locality_name;
|
| + }
|
| + void SetAdminAreaName(const std::string& administrative_area_name) {
|
| + administrative_area_name_ = administrative_area_name;
|
| + }
|
| + void SetPostalCodeNumber(const std::string& postal_code_number) {
|
| + postal_code_number_ = postal_code_number;
|
| + }
|
| + void SetPhoneNumber(const std::string& phone_number) {
|
| + phone_number_ = phone_number;
|
| + }
|
| + void SetObjectId(const std::string& object_id) {
|
| + object_id_ = object_id;
|
| + }
|
| +
|
| + static scoped_ptr<Address> FromWalletDictionary(
|
| + base::DictionaryValue* dictionary);
|
| + static scoped_ptr<Address> FromClientDictionary(
|
| + base::DictionaryValue* dictionary);
|
| + bool operator==(const Address& other) const;
|
| + bool operator!=(const Address& other) const;
|
| +
|
| + private:
|
| + std::string country_name_code_;
|
| + std::string recipient_name_;
|
| + std::string address_line_1_;
|
| + std::string address_line_2_;
|
| + std::string locality_name_;
|
| + std::string administrative_area_name_;
|
| + std::string postal_code_number_;
|
| + std::string phone_number_;
|
| + std::string object_id_;
|
| + DISALLOW_COPY_AND_ASSIGN(Address);
|
| +};
|
| +
|
| +} // end wallet namespace
|
| +
|
| +#endif // CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
|
|
|