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

Issue 106763007: [rac] Parse postal code formats and required fields in libaddressinput. (Closed)

Created:
7 years ago by please use gerrit instead
Modified:
6 years, 11 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, lararennie, roubert
Visibility:
Public.

Description

[rac] Parse postal code formats and required fields in libaddressinput. This patch makes the Rule object parse postal code format and required fields. This data will be used in validation logic. BUG=327046 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242951

Patch Set 1 #

Total comments: 4

Patch Set 2 : Omit postal code examples and URL. #

Total comments: 4

Patch Set 3 : Move AddressField parsing into Rule. Add more tests for parsing AddressFields. #

Total comments: 2

Patch Set 4 : A vector of vectors for the address format rules. #

Total comments: 4

Patch Set 5 : No static non-POD function variables. #

Total comments: 9

Patch Set 6 : Combine IsToken and ParseToken. Split format string on %. #

Total comments: 5

Patch Set 7 : Do not handle invalid formats. #

Patch Set 8 : Fix compile on windows. #

Total comments: 5

Patch Set 9 : Merge. #

Patch Set 10 : Test that SHORT_EOL is not needed. #

Patch Set 11 : Use size_t. #

Patch Set 12 : Clearer test. #

Patch Set 13 : Merge. #

Patch Set 14 : Test that parsing empty data does not overwrite a rule. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+369 lines, -351 lines) Patch
M third_party/libaddressinput/chromium/cpp/libaddressinput.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_field_util.h View 1 2 1 chunk +0 lines, -42 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_field_util.cc View 1 2 1 chunk +0 lines, -84 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_ui.cc View 1 2 3 3 chunks +15 lines, -27 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.h View 1 2 3 3 chunks +13 lines, -4 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +147 lines, -78 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/util/json.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/address_field_util_test.cc View 1 2 1 chunk +0 lines, -73 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/rule_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +191 lines, -36 lines 0 comments Download
M third_party/libaddressinput/libaddressinput.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
please use gerrit instead
Evan: PTAL.
7 years ago (2013-12-13 23:22:51 UTC) #1
Evan Stade
https://codereview.chromium.org/106763007/diff/1/third_party/libaddressinput/chromium/cpp/src/rule.h File third_party/libaddressinput/chromium/cpp/src/rule.h (right): https://codereview.chromium.org/106763007/diff/1/third_party/libaddressinput/chromium/cpp/src/rule.h#newcode72 third_party/libaddressinput/chromium/cpp/src/rule.h:72: const std::string& GetPostalCodeExamples() const { how is this useful? ...
7 years ago (2013-12-13 23:34:29 UTC) #2
please use gerrit instead
Evan: PTAL. https://codereview.chromium.org/106763007/diff/1/third_party/libaddressinput/chromium/cpp/src/rule.h File third_party/libaddressinput/chromium/cpp/src/rule.h (right): https://codereview.chromium.org/106763007/diff/1/third_party/libaddressinput/chromium/cpp/src/rule.h#newcode72 third_party/libaddressinput/chromium/cpp/src/rule.h:72: const std::string& GetPostalCodeExamples() const { On 2013/12/13 ...
7 years ago (2013-12-16 20:49:56 UTC) #3
Evan Stade
https://codereview.chromium.org/106763007/diff/20001/third_party/libaddressinput/chromium/cpp/src/address_field_util.h File third_party/libaddressinput/chromium/cpp/src/address_field_util.h (right): https://codereview.chromium.org/106763007/diff/20001/third_party/libaddressinput/chromium/cpp/src/address_field_util.h#newcode42 third_party/libaddressinput/chromium/cpp/src/address_field_util.h:42: void ParseAddressFieldsRequired(const std::string& required, why isn't this part of ...
7 years ago (2013-12-17 19:47:24 UTC) #4
please use gerrit instead
Evan: PTAL Patch Set 3. https://codereview.chromium.org/106763007/diff/20001/third_party/libaddressinput/chromium/cpp/src/address_field_util.h File third_party/libaddressinput/chromium/cpp/src/address_field_util.h (right): https://codereview.chromium.org/106763007/diff/20001/third_party/libaddressinput/chromium/cpp/src/address_field_util.h#newcode42 third_party/libaddressinput/chromium/cpp/src/address_field_util.h:42: void ParseAddressFieldsRequired(const std::string& required, ...
7 years ago (2013-12-18 00:57:49 UTC) #5
Evan Stade
https://codereview.chromium.org/106763007/diff/40001/third_party/libaddressinput/chromium/cpp/src/rule.h File third_party/libaddressinput/chromium/cpp/src/rule.h (right): https://codereview.chromium.org/106763007/diff/40001/third_party/libaddressinput/chromium/cpp/src/rule.h#newcode29 third_party/libaddressinput/chromium/cpp/src/rule.h:29: // An extension of AddressField enum used only internally. ...
7 years ago (2013-12-18 23:18:16 UTC) #6
please use gerrit instead
Evan: PTAL Patch Set 4.
7 years ago (2013-12-19 22:43:47 UTC) #7
Evan Stade
https://codereview.chromium.org/106763007/diff/60001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/60001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode120 third_party/libaddressinput/chromium/cpp/src/rule.cc:120: static const std::map<char, AddressField> kFields(InitFields()); no static non-PODs allowed ...
7 years ago (2013-12-19 23:00:04 UTC) #8
please use gerrit instead
Evan: PTAL Patch Set 5. https://codereview.chromium.org/106763007/diff/60001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/60001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode120 third_party/libaddressinput/chromium/cpp/src/rule.cc:120: static const std::map<char, AddressField> ...
7 years ago (2013-12-20 00:37:42 UTC) #9
Evan Stade
https://codereview.chromium.org/106763007/diff/80001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/80001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode57 third_party/libaddressinput/chromium/cpp/src/rule.cc:57: AddressField ParseToken(char c) { bool ParseToken(char c, AddressField* field) ...
7 years ago (2013-12-20 03:55:12 UTC) #10
please use gerrit instead
Evan: PTAL Patch Set 6. https://codereview.chromium.org/106763007/diff/80001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/80001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode57 third_party/libaddressinput/chromium/cpp/src/rule.cc:57: AddressField ParseToken(char c) { ...
7 years ago (2013-12-20 22:03:32 UTC) #11
Evan Stade
https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode79 third_party/libaddressinput/chromium/cpp/src/rule.cc:79: bool begin_newline = true; I think you should either ...
7 years ago (2013-12-20 22:21:27 UTC) #12
please use gerrit instead
Evan: PTAL Patch Set 7. https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode79 third_party/libaddressinput/chromium/cpp/src/rule.cc:79: bool begin_newline = true; ...
7 years ago (2013-12-20 23:11:19 UTC) #13
Evan Stade
https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc File third_party/libaddressinput/chromium/cpp/src/address_ui.cc (right): https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc#newcode105 third_party/libaddressinput/chromium/cpp/src/address_ui.cc:105: line_it->size() == 1 ? AddressUiComponent::HINT_LONG On 2013/12/20 22:03:33, Rouslan ...
7 years ago (2013-12-21 00:27:12 UTC) #14
please use gerrit instead
Evan: PTAL. https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc File third_party/libaddressinput/chromium/cpp/src/address_ui.cc (right): https://codereview.chromium.org/106763007/diff/90001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc#newcode105 third_party/libaddressinput/chromium/cpp/src/address_ui.cc:105: line_it->size() == 1 ? AddressUiComponent::HINT_LONG On 2013/12/21 ...
6 years, 11 months ago (2014-01-02 19:49:38 UTC) #15
Evan Stade
lgtm
6 years, 11 months ago (2014-01-02 22:05:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/106763007/460001
6 years, 11 months ago (2014-01-02 22:52:56 UTC) #17
commit-bot: I haz the power
Failed to apply patch for third_party/libaddressinput/libaddressinput.gyp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 11 months ago (2014-01-02 22:53:04 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/106763007/570001
6 years, 11 months ago (2014-01-02 23:25:40 UTC) #19
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) chromedriver2_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=209323
6 years, 11 months ago (2014-01-03 00:12:38 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/106763007/570001
6 years, 11 months ago (2014-01-03 17:34:05 UTC) #21
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) chromedriver2_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=207513
6 years, 11 months ago (2014-01-03 18:15:21 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/106763007/570001
6 years, 11 months ago (2014-01-03 19:06:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/106763007/830002
6 years, 11 months ago (2014-01-03 19:41:30 UTC) #24
commit-bot: I haz the power
6 years, 11 months ago (2014-01-03 22:47:18 UTC) #25
Message was sent while issue was closed.
Change committed as 242951

Powered by Google App Engine
This is Rietveld 408576698