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

Unified Diff: third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h

Issue 131223004: [rac] Format an address for display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 6 years, 11 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
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h
diff --git a/third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h b/third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h
index 8c8b75e316af5d7e139d105c866c283971981de3..86c1f3d215199169434acd55c6219e3174e3e523 100644
--- a/third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h
+++ b/third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h
@@ -29,19 +29,28 @@ namespace addressinput {
// Stores an address. Sample usage:
// AddressData address;
-// address.country_code = "US";
+// address.recipient = "Chen-Kang Yang";
+// address.organization = "Google";
// address.address_lines.push_back("1098 Alta Ave");
// address.administrative_area = "CA";
// address.locality = "Mountain View";
// address.postal_code = "94043";
-// address.organization = "Google";
-// address.recipient = "Chen-Kang Yang";
+// address.country_code = "US";
// address.language_code = "en";
// Process(address);
struct AddressData {
+ // Clears |lines| and populates it with the lines of the address as they
+ // should appear on an envelope for |country_code|. The |lines| parameter
+ // should not be NULL.
+ //
+ // If there're no address formatting rules for |country_code|, then the
+ // default rules are used:
+ // https://i18napis.appspot.com/ssl-address/data/ZZ
+ void FormatForDisplay(std::vector<std::string>* lines) const;
+
// Returns the value of the |field|. The parameter should not be
// STREET_ADDRESS, which comprises multiple fields.
- const std::string& GetField(AddressField field) const;
+ const std::string& GetFieldValue(AddressField field) const;
// The BCP 47 language code used to guide how the address is formatted for
// display. The same address may have different representations in different
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698