OLD | NEW |
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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include <re2/re2.h> | 34 #include <re2/re2.h> |
35 | 35 |
36 #include "country_rules_aggregator.h" | 36 #include "country_rules_aggregator.h" |
37 #include "grit/libaddressinput_strings.h" | 37 #include "grit/libaddressinput_strings.h" |
38 #include "region_data_constants.h" | 38 #include "region_data_constants.h" |
39 #include "retriever.h" | 39 #include "retriever.h" |
40 #include "rule.h" | 40 #include "rule.h" |
41 #include "ruleset.h" | 41 #include "ruleset.h" |
42 #include "util/stl_util.h" | 42 #include "util/stl_util.h" |
43 #include "util/string_util.h" | 43 #include "util/string_compare.h" |
44 | 44 |
45 namespace i18n { | 45 namespace i18n { |
46 namespace addressinput { | 46 namespace addressinput { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 // A type to store a list of pointers to Ruleset objects. | 50 // A type to store a list of pointers to Ruleset objects. |
51 typedef std::set<const Ruleset*> Rulesets; | 51 typedef std::set<const Ruleset*> Rulesets; |
52 | 52 |
53 // A type to map the field in a rule to rulesets. | 53 // A type to map the field in a rule to rulesets. |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 scoped_ptr<Downloader> downloader, | 511 scoped_ptr<Downloader> downloader, |
512 scoped_ptr<Storage> storage, | 512 scoped_ptr<Storage> storage, |
513 LoadRulesDelegate* load_rules_delegate) { | 513 LoadRulesDelegate* load_rules_delegate) { |
514 return scoped_ptr<AddressValidator>(new AddressValidatorImpl( | 514 return scoped_ptr<AddressValidator>(new AddressValidatorImpl( |
515 validation_data_url, downloader.Pass(), storage.Pass(), | 515 validation_data_url, downloader.Pass(), storage.Pass(), |
516 load_rules_delegate)); | 516 load_rules_delegate)); |
517 } | 517 } |
518 | 518 |
519 } // namespace addressinput | 519 } // namespace addressinput |
520 } // namespace i18n | 520 } // namespace i18n |
OLD | NEW |