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

Issue 109323011: [rac] Download all rules for a country code in libaddressinput. (Closed)

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

Description

[rac] Download all rules for a country code in libaddressinput. This patch enables downloading all rules for a country code. The rules are organized into a Ruleset tree, where nodes contain region-wide rules, language-specific rules, and Rulesets for the sub-regions. For example, the country code of Canada is "CA". The Ruleset for "CA" contains the general validation rules for Canada in the default language of the country, which is English, or "en". One of the child nodes of "CA" is a Rule for "fr" language. This Rule contains the general validation rules for Canada in the French language. The rest of the child nodes of "CA" are the Ruleset objects for all of the Canada's provinces. For example, there's a Ruleset for "BC" for British Columbia. Example of a Ruleset for Canada and some of its provinces: CA-->fr | ------------------------------------- | | | | | v v v v v AB-->fr BC-->fr MB-->fr NB-->fr NL-->fr BUG=327046 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243754

Patch Set 1 #

Patch Set 2 : Merge smaller patches. #

Total comments: 1

Patch Set 3 : Comments. #

Patch Set 4 : Merge. #

Patch Set 5 : Clean up a tree of LookupKey objects on load failure. #

Total comments: 6

Patch Set 6 : Merge. #

Patch Set 7 : Ruleset. #

Patch Set 8 : Typo fixes. #

Patch Set 9 : Fix typo in assert. #

Patch Set 10 : Fix debug build. #

Total comments: 16

Patch Set 11 : Address comments. #

Patch Set 12 : Rename default rule variable. #

Patch Set 13 : Remove helper from country rules retriever. #

Patch Set 14 : Remove file comment. #

Patch Set 15 : Address comments. #

Total comments: 6

Patch Set 16 : Remove request data from list after response. #

Patch Set 17 : Abandon in-progress requests upon new requests. #

Total comments: 2

Patch Set 18 : Remove duplicate lines. #

Patch Set 19 : Fix windows build. #

Total comments: 4

Patch Set 20 : Address comments. #

Patch Set 21 : Merge. #

Patch Set 22 : Fix mac build. #

Total comments: 34

Patch Set 23 : Address comments. #

Patch Set 24 : Address data #

Total comments: 4

Patch Set 25 : Address nits #

Patch Set 26 : Add a TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+712 lines, -83 lines) Patch
M third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_validator.h View 1 2 3 4 5 4 chunks +20 lines, -19 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +91 lines, -22 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/libaddressinput.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_ui.cc View 1 2 3 4 5 6 2 chunks +1 line, -19 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_validator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +90 lines, -14 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +120 lines, -0 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/country_rules_aggregator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +210 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/retriever.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +21 lines, -5 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +13 lines, -0 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/ruleset.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +78 lines, -0 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/ruleset.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +56 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/retriever_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -4 lines 0 comments Download
M third_party/libaddressinput/libaddressinput.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
please use gerrit instead
Evan: PTAL. I've avoided adding unit tests until we finalize this design, as we've discussed ...
7 years ago (2013-12-13 02:46:50 UTC) #1
please use gerrit instead
Evan: PTAL Patch Set 3 with more comments. I've also updated the issue description. https://codereview.chromium.org/109323011/diff/10001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc ...
7 years ago (2013-12-16 23:41:38 UTC) #2
Evan Stade
https://codereview.chromium.org/109323011/diff/80001/third_party/libaddressinput/chromium/cpp/src/lookup_key.h File third_party/libaddressinput/chromium/cpp/src/lookup_key.h (right): https://codereview.chromium.org/109323011/diff/80001/third_party/libaddressinput/chromium/cpp/src/lookup_key.h#newcode15 third_party/libaddressinput/chromium/cpp/src/lookup_key.h:15: // An object to store a parsed validation rule, ...
7 years ago (2013-12-18 23:54:35 UTC) #3
please use gerrit instead
Evan: PTAL Patch Set 7. I've changed LookupKey to Ruleset that contains only rules. I've ...
6 years, 11 months ago (2014-01-06 20:48:41 UTC) #4
please use gerrit instead
Patch Set 9 has a few minor fixes. It may be more pleasant to review.
6 years, 11 months ago (2014-01-06 21:08:44 UTC) #5
Evan Stade
https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h File third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h (right): https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h#newcode1 third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h:1: // Copyright (C) 2013 Google Inc. why the changes ...
6 years, 11 months ago (2014-01-06 22:54:18 UTC) #6
Evan Stade
https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/src/rule.cc File third_party/libaddressinput/chromium/cpp/src/rule.cc (right): https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/src/rule.cc#newcode165 third_party/libaddressinput/chromium/cpp/src/rule.cc:165: static Rule rule; On 2014/01/06 22:54:19, Evan Stade wrote: ...
6 years, 11 months ago (2014-01-06 23:33:16 UTC) #7
please use gerrit instead
Evan: PTAL Patch Set 12 and the comments below. https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h File third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h (right): https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h#newcode1 third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h:1: ...
6 years, 11 months ago (2014-01-06 23:44:34 UTC) #8
Evan Stade
https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h File third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h (right): https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h#newcode1 third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h:1: // Copyright (C) 2013 Google Inc. On 2014/01/06 23:44:35, ...
6 years, 11 months ago (2014-01-07 00:03:14 UTC) #9
please use gerrit instead
Evan: PTAL Patch Set 15. https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h File third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h (right): https://codereview.chromium.org/109323011/diff/590002/third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h#newcode1 third_party/libaddressinput/chromium/cpp/include/libaddressinput/callback.h:1: // Copyright (C) 2013 ...
6 years, 11 months ago (2014-01-07 01:54:37 UTC) #10
Evan Stade
https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode152 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:152: rulesets_.push_back(ruleset_data); why would you need to retrieve rules for ...
6 years, 11 months ago (2014-01-07 20:09:58 UTC) #11
please use gerrit instead
Evan: PTAL Patch Set 16 and the comment below. https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode152 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:152: ...
6 years, 11 months ago (2014-01-07 22:11:08 UTC) #12
Evan Stade
https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode152 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:152: rulesets_.push_back(ruleset_data); On 2014/01/07 22:11:08, Rouslan Solomakhin wrote: > On ...
6 years, 11 months ago (2014-01-07 22:13:13 UTC) #13
please use gerrit instead
Evan: PTAL Patch Set 17. I've changed the code to abandon the old requests upon ...
6 years, 11 months ago (2014-01-07 22:57:08 UTC) #14
please use gerrit instead
https://codereview.chromium.org/109323011/diff/1110001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/1110001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode197 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:197: languages_.clear(); Err, copy-paste error. Fix incoming.
6 years, 11 months ago (2014-01-07 23:00:41 UTC) #15
please use gerrit instead
Patch Set 18. https://codereview.chromium.org/109323011/diff/1110001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/1110001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode197 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:197: languages_.clear(); On 2014/01/07 23:00:42, Rouslan Solomakhin ...
6 years, 11 months ago (2014-01-07 23:03:41 UTC) #16
Evan Stade
Indeed, my Retriever change already landed. https://codereview.chromium.org/109323011/diff/1260001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc (right): https://codereview.chromium.org/109323011/diff/1260001/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc#newcode114 third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc:114: success_ &= success; ...
6 years, 11 months ago (2014-01-08 01:22:45 UTC) #17
please use gerrit instead
Evan: PTAL Patch Set 20. I've also updated Retriever to abandon previous requests when there's ...
6 years, 11 months ago (2014-01-08 02:04:39 UTC) #18
lararennie
On 2014/01/07 22:13:13, Evan Stade wrote: > https://codereview.chromium.org/109323011/diff/890015/third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc > File third_party/libaddressinput/chromium/cpp/src/country_rules_retriever.cc > (right): > > ...
6 years, 11 months ago (2014-01-08 08:29:00 UTC) #19
Evan Stade
On 2014/01/08 08:29:00, lararennie wrote: > On 2014/01/07 22:13:13, Evan Stade wrote: > > > ...
6 years, 11 months ago (2014-01-08 20:22:50 UTC) #20
Evan Stade
https://codereview.chromium.org/109323011/diff/1470001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc File third_party/libaddressinput/chromium/cpp/src/address_validator.cc (right): https://codereview.chromium.org/109323011/diff/1470001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc#newcode50 third_party/libaddressinput/chromium/cpp/src/address_validator.cc:50: scoped_ptr<Storage>(storage.Pass())))), I'm not sure but I don't think you ...
6 years, 11 months ago (2014-01-08 21:08:59 UTC) #21
please use gerrit instead
Evan: PTAL Patch Set 24. https://codereview.chromium.org/109323011/diff/1470001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc File third_party/libaddressinput/chromium/cpp/src/address_validator.cc (right): https://codereview.chromium.org/109323011/diff/1470001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc#newcode50 third_party/libaddressinput/chromium/cpp/src/address_validator.cc:50: scoped_ptr<Storage>(storage.Pass())))), On 2014/01/08 21:08:59, ...
6 years, 11 months ago (2014-01-09 00:38:10 UTC) #22
Evan Stade
lgtm with nits https://codereview.chromium.org/109323011/diff/1640001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc File third_party/libaddressinput/chromium/cpp/src/address_validator.cc (right): https://codereview.chromium.org/109323011/diff/1640001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc#newcode48 third_party/libaddressinput/chromium/cpp/src/address_validator.cc:48: : aggregator_(scoped_ptr<Retriever>(new Retriever( I'm thinking the ...
6 years, 11 months ago (2014-01-09 01:01:39 UTC) #23
please use gerrit instead
Addressed the nits and sent to cq. https://codereview.chromium.org/109323011/diff/1640001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc File third_party/libaddressinput/chromium/cpp/src/address_validator.cc (right): https://codereview.chromium.org/109323011/diff/1640001/third_party/libaddressinput/chromium/cpp/src/address_validator.cc#newcode48 third_party/libaddressinput/chromium/cpp/src/address_validator.cc:48: : aggregator_(scoped_ptr<Retriever>(new ...
6 years, 11 months ago (2014-01-09 01:19:08 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/109323011/1680002
6 years, 11 months ago (2014-01-09 01:27:58 UTC) #25
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 04:05:11 UTC) #26
Message was sent while issue was closed.
Change committed as 243754

Powered by Google App Engine
This is Rietveld 408576698