Index: chrome/browser/autofill/address.h |
diff --git a/chrome/browser/autofill/address.h b/chrome/browser/autofill/address.h |
index ff0c7f66c33c55317fa76e35bba352c4385d35b4..219234a0a7e67928dfd3430d23e2c49aabf74f0e 100644 |
--- a/chrome/browser/autofill/address.h |
+++ b/chrome/browser/autofill/address.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_AUTOFILL_ADDRESS_H_ |
#pragma once |
+#include <string> |
#include <vector> |
#include "base/string16.h" |
@@ -28,6 +29,11 @@ class Address : public FormGroup { |
virtual string16 GetFieldText(const AutoFillType& type) const; |
virtual void SetInfo(const AutoFillType& type, const string16& value); |
+ const std::string& country_code() const { return country_code_; } |
+ void set_country_code(const std::string& country_code) { |
+ country_code_ = country_code; |
+ } |
+ |
// Sets all of the fields to the empty string. |
void Clear(); |
@@ -39,9 +45,16 @@ class Address : public FormGroup { |
void operator=(const Address& address); |
+ // Returns the localized country name corresponding to |country_code_|. |
+ string16 Country() const; |
+ |
void set_line1(const string16& line1); |
void set_line2(const string16& line2); |
+ // Sets the |country_code_| based on |country|, which should be a localized |
+ // country name. |
+ void SetCountry(const string16& country); |
+ |
// The following functions match |text| against the various values of the |
// address, returning true on match. |
virtual bool IsLine1(const string16& text) const; |
@@ -73,7 +86,7 @@ class Address : public FormGroup { |
string16 line2_; |
string16 city_; |
string16 state_; |
- string16 country_; |
+ std::string country_code_; |
string16 zip_code_; |
}; |