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

Side by Side Diff: chrome/browser/autofill/wallet/wallet_address.h

Issue 11293078: Integrating Online Wallet into Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests. Real encryption/decryption. Created 8 years, 1 month 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
6 #define CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12
13 namespace base {
14 class DictionaryValue;
15 }
16
17 namespace wallet {
18
19 class Address {
20 public:
21 Address();
22 // TODO(ahutter): do we need descriptive_name, is_post_box,
23 // is_minimal_address, is_valid, or is_default
24 Address(const std::string& country_name_code,
25 const std::string& recipient_name,
26 const std::string& address_line_1,
27 const std::string& address_line_2,
28 const std::string& locality_name,
29 const std::string& administrative_area_name,
30 const std::string& postal_code_number,
31 const std::string& phone_number,
32 const std::string& object_id);
33 ~Address();
34 const std::string GetCountryNameCode() const { return country_name_code_; }
35 const std::string GetRecipientName() const { return recipient_name_; }
36 const std::string GetAddressLine1() const { return address_line_1_; }
37 const std::string GetAddressLine2() const { return address_line_2_; }
38 const std::string GetLocalityName() const { return locality_name_; }
39 const std::string GetAdminAreaName() const {
40 return administrative_area_name_;
41 }
42 const std::string GetPostalCodeNumber() const { return postal_code_number_; }
43 const std::string GetPhoneNumber() const { return phone_number_; }
44 const std::string GetObjectId() const { return object_id_; }
45
46 void SetCountryNameCode(const std::string& country_name_code) {
Dane Wallinga 2012/11/16 01:27:25 don't know what chromium/cpp policy is on builders
47 country_name_code_ = country_name_code;
48 }
49 void SetRecipientName(const std::string& recipient_name) {
50 recipient_name_ = recipient_name;
51 }
52 void SetAddressLine1(const std::string& address_line_1) {
53 address_line_1_ = address_line_1;
54 }
55 void SetAddressLine2(const std::string& address_line_2) {
56 address_line_2_ = address_line_2;
57 }
58 void SetLocalityName(const std::string& locality_name) {
59 locality_name_ = locality_name;
60 }
61 void SetAdminAreaName(const std::string& administrative_area_name) {
62 administrative_area_name_ = administrative_area_name;
63 }
64 void SetPostalCodeNumber(const std::string& postal_code_number) {
65 postal_code_number_ = postal_code_number;
66 }
67 void SetPhoneNumber(const std::string& phone_number) {
68 phone_number_ = phone_number;
69 }
70 void SetObjectId(const std::string& object_id) {
71 object_id_ = object_id;
72 }
73
74 static scoped_ptr<Address> FromWalletDictionary(
75 base::DictionaryValue* dictionary);
76 static scoped_ptr<Address> FromClientDictionary(
77 base::DictionaryValue* dictionary);
78 bool operator==(const Address& other) const;
79 bool operator!=(const Address& other) const;
80
81 private:
82 std::string country_name_code_;
83 std::string recipient_name_;
84 std::string address_line_1_;
85 std::string address_line_2_;
86 std::string locality_name_;
87 std::string administrative_area_name_;
88 std::string postal_code_number_;
89 std::string phone_number_;
90 std::string object_id_;
91 DISALLOW_COPY_AND_ASSIGN(Address);
92 };
93
94 } // end wallet namespace
95
96 #endif // CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698