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

Unified Diff: components/autofill/browser/wallet/wallet_address.h

Issue 15697010: Autofill:requestAutocomplete: Enable prompting for complete address when instrument being used does… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to head instead of using lkgr Created 7 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/wallet/wallet_address.h
diff --git a/components/autofill/browser/wallet/wallet_address.h b/components/autofill/browser/wallet/wallet_address.h
index 937553eefe29557c1dab914843f4ea33cc61daa0..953af5af3aa9f21c2ad55a9ad114bc287e1840f7 100644
--- a/components/autofill/browser/wallet/wallet_address.h
+++ b/components/autofill/browser/wallet/wallet_address.h
@@ -60,6 +60,8 @@ class Address {
static scoped_ptr<Address> CreateAddress(
const base::DictionaryValue& dictionary);
+ // TODO(ahutter): Make obvious in the function name that this public method
+ // only works for shipping address and assumes existance of "postal_address".
// Builds an Address from |dictionary|, which must have an "id" field. This
// function is designed for use with shipping addresses. The function may fail
// and return an empty pointer if its input is invalid.
@@ -105,6 +107,9 @@ class Address {
}
const base::string16& phone_number() const { return phone_number_; }
const std::string& object_id() const { return object_id_; }
+ bool is_complete_address() const {
+ return is_complete_address_;
+ }
void set_country_name_code(const std::string& country_name_code) {
country_name_code_ = country_name_code;
@@ -134,6 +139,9 @@ class Address {
void set_object_id(const std::string& object_id) {
object_id_ = object_id;
}
+ void set_is_complete_address(bool is_complete_address) {
+ is_complete_address_ = is_complete_address;
+ }
bool operator==(const Address& other) const;
bool operator!=(const Address& other) const;
@@ -175,6 +183,9 @@ class Address {
// Externalized Online Wallet id for this address.
std::string object_id_;
+ // Server's understanding of this address as complete address or not.
+ bool is_complete_address_;
+
// This class is intentionally copyable.
DISALLOW_ASSIGN(Address);
};
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper.cc ('k') | components/autofill/browser/wallet/wallet_address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698