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

Unified Diff: third_party/libaddressinput/chromium/chrome_address_validator.cc

Issue 2800013004: Revert of Use dropdown list for admin areas in pr form. (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/libaddressinput/chromium/chrome_address_validator.cc
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator.cc b/third_party/libaddressinput/chromium/chrome_address_validator.cc
index 320451b6d71a86e956219db03ee0cc8756921fca..b0bd189d8f0542de34bc185ab102e1cee1d2b28d 100644
--- a/third_party/libaddressinput/chromium/chrome_address_validator.cc
+++ b/third_party/libaddressinput/chromium/chrome_address_validator.cc
@@ -17,7 +17,6 @@
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_normalizer.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
-#include "third_party/libaddressinput/src/cpp/src/rule.h"
namespace autofill {
namespace {
@@ -28,7 +27,6 @@
using ::i18n::addressinput::BuildCallback;
using ::i18n::addressinput::FieldProblemMap;
using ::i18n::addressinput::PreloadSupplier;
-using ::i18n::addressinput::Rule;
using ::i18n::addressinput::Source;
using ::i18n::addressinput::Storage;
@@ -58,20 +56,6 @@
void AddressValidator::LoadRules(const std::string& region_code) {
attempts_number_[region_code] = 0;
supplier_->LoadRules(region_code, *rules_loaded_);
-}
-
-std::vector<std::string> AddressValidator::GetRegionSubKeys(
- const std::string& region_code) {
- if (!AreRulesLoadedForRegion(region_code))
- return std::vector<std::string>();
-
- auto rules = supplier_->GetRulesForRegion(region_code);
- auto rule_iterator = rules.find("data/" + region_code);
-
- if (rule_iterator == rules.end() || !rule_iterator->second)
- return std::vector<std::string>();
-
- return rule_iterator->second->GetSubKeys();
}
AddressValidator::Status AddressValidator::ValidateAddress(
@@ -157,7 +141,7 @@
const std::string& region_code,
int) {
if (load_rules_listener_)
- load_rules_listener_->OnAddressRulesLoaded(region_code, success);
+ load_rules_listener_->OnAddressValidationRulesLoaded(region_code, success);
// Count the first failed attempt to load rules as well.
if (success || attempts_number_[region_code] + 1 >= kMaxAttemptsNumber)

Powered by Google App Engine
This is Rietveld 408576698