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: third_party/libaddressinput/chromium/cpp/src/address_field_util.h

Issue 106763007: [rac] Parse postal code formats and required fields in libaddressinput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Omit postal code examples and URL. Created 7 years 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
1 // Copyright (C) 2013 Google Inc. 1 // Copyright (C) 2013 Google Inc.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 18 matching lines...) Expand all
29 NEWLINE = -1 29 NEWLINE = -1
30 }; 30 };
31 31
32 // Clears |fields|, parses |format|, and adds the format address fields to 32 // Clears |fields|, parses |format|, and adds the format address fields to
33 // |fields|. The |fields| may also contain NEWLINE elements. For example, parses 33 // |fields|. The |fields| may also contain NEWLINE elements. For example, parses
34 // "%S%C%n%D%X" into {ADMIN_AREA, LOCALITY, NEWLINE, DEPENDENT_LOCALITY, 34 // "%S%C%n%D%X" into {ADMIN_AREA, LOCALITY, NEWLINE, DEPENDENT_LOCALITY,
35 // SORTING_CODE}. 35 // SORTING_CODE}.
36 void ParseAddressFieldsFormat(const std::string& format, 36 void ParseAddressFieldsFormat(const std::string& format,
37 std::vector<AddressField>* fields); 37 std::vector<AddressField>* fields);
38 38
39 // Clears |fields|, parses |required|, and adds the required fields to |fields|.
40 // For example, parses "SCDX" into {ADMIN_AREA, LOCALITY, DEPENDENT_LOCALITY,
41 // SORTING_CODE}.
42 void ParseAddressFieldsRequired(const std::string& required,
Evan Stade 2013/12/17 19:47:24 why isn't this part of Rule? what other code will
please use gerrit instead 2013/12/18 00:57:50 This header is only every used in Rule. Moved ever
43 std::vector<AddressField>* fields);
44
39 } // namespace addressinput 45 } // namespace addressinput
40 } // namespace i18n 46 } // namespace i18n
41 47
42 #endif // I18N_ADDRESSINPUT_ADDRESS_FIELD_UTIL_H_ 48 #endif // I18N_ADDRESSINPUT_ADDRESS_FIELD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698