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

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: Changes from Dane's review 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
12 namespace base {
13 class DictionaryValue;
14 }
15
16 namespace wallet {
17
18 class Address {
19 public:
20 Address();
21 // TODO(ahutter): do we need descriptive_name, is_post_box,
22 // is_minimal_address, is_valid, or is_default
Raman Kakilate 2012/11/17 02:28:31 we need is_minimal_address for upgrade flow ? an
ahutter 2012/11/27 00:46:12 It's part of the response so we're ok there. I'm
23 Address(const std::string& country_name_code,
24 const std::string& recipient_name,
25 const std::string& address_line_1,
26 const std::string& address_line_2,
27 const std::string& locality_name,
28 const std::string& administrative_area_name,
29 const std::string& postal_code_number,
Raman Kakilate 2012/11/17 02:28:31 extra space before "postal_.."
ahutter 2012/11/27 00:46:12 Done.
30 const std::string& phone_number,
31 const std::string& object_id);
32 ~Address();
33 const std::string get_country_name_code() const { return country_name_code_; }
benquan 2012/12/15 02:48:59 should const getters return const references?
ahutter 2012/12/17 17:23:02 They do in the most recent CL.
34 const std::string get_recipient_name() const { return recipient_name_; }
35 const std::string get_address_line_1() const { return address_line_1_; }
36 const std::string get_address_line_2() const { return address_line_2_; }
37 const std::string get_locality_name() const { return locality_name_; }
38 const std::string get_admin_area_name() const {
39 return administrative_area_name_;
40 }
41 const std::string get_postal_code_number() const {
42 return postal_code_number_;
43 }
44 const std::string get_phone_number() const { return phone_number_; }
45 const std::string get_object_id() const { return object_id_; }
46
47 void set_country_name_code(const std::string& country_name_code) {
48 country_name_code_ = country_name_code;
49 }
50 void set_recipient_name(const std::string& recipient_name) {
51 recipient_name_ = recipient_name;
52 }
53 void set_address_line_1(const std::string& address_line_1) {
54 address_line_1_ = address_line_1;
55 }
56 void set_address_line_2(const std::string& address_line_2) {
57 address_line_2_ = address_line_2;
58 }
59 void set_locality_name(const std::string& locality_name) {
60 locality_name_ = locality_name;
61 }
62 void set_admin_area_name(const std::string& administrative_area_name) {
63 administrative_area_name_ = administrative_area_name;
64 }
65 void set_postal_code_number(const std::string& postal_code_number) {
66 postal_code_number_ = postal_code_number;
67 }
68 void set_phone_number(const std::string& phone_number) {
69 phone_number_ = phone_number;
70 }
71 void set_object_id(const std::string& object_id) {
Raman Kakilate 2012/11/17 02:28:31 optional: %s/object_id/address_id ?
Raman Kakilate 2012/11/17 04:10:51 Ah .. ok. object_id is name used within API itself
ahutter 2012/11/27 00:46:12 ack.
ahutter 2012/11/27 00:46:12 ack.
72 object_id_ = object_id;
73 }
74
75 static Address* CreateFromIdedDictionary(
Raman Kakilate 2012/11/17 02:28:31 Create and Dictionary doesn't seem to go well toge
ahutter 2012/11/27 00:46:12 Done.
76 base::DictionaryValue* dictionary);
77 static Address* CreateFromDisplayDictionary(
78 base::DictionaryValue* dictionary);
79 bool operator==(const Address& other) const;
80 bool operator!=(const Address& other) const;
81
82 private:
83 std::string country_name_code_;
84 std::string recipient_name_;
85 std::string address_line_1_;
86 std::string address_line_2_;
87 std::string locality_name_;
88 std::string administrative_area_name_;
89 std::string postal_code_number_;
90 std::string phone_number_;
91 std::string object_id_;
92 DISALLOW_COPY_AND_ASSIGN(Address);
93 };
94
95 } // end wallet namespace
96
97 #endif // CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ADDRESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698