| Index: third_party/libaddressinput/chromium/cpp/src/address_ui.cc
|
| diff --git a/third_party/libaddressinput/chromium/cpp/src/address_ui.cc b/third_party/libaddressinput/chromium/cpp/src/address_ui.cc
|
| index c5e9712f6be6b3c63720142f72c6dc9e229c2545..cf57543bb743e2e9012f72e2bad16732dd799083 100644
|
| --- a/third_party/libaddressinput/chromium/cpp/src/address_ui.cc
|
| +++ b/third_party/libaddressinput/chromium/cpp/src/address_ui.cc
|
| @@ -31,24 +31,6 @@ namespace addressinput {
|
|
|
| namespace {
|
|
|
| -// Parses the default region data into the static Rule object and returns a
|
| -// constant reference to this object. Cannot return a copy of the object,
|
| -// because Rule objects are not copyable.
|
| -const Rule& InitDefaultRule() {
|
| - static Rule rule;
|
| - rule.ParseSerializedRule(RegionDataConstants::GetDefaultRegionData());
|
| - return rule;
|
| -}
|
| -
|
| -// Returns the constant reference to the Rule object from InitDefaultRule(). The
|
| -// static object is in InitDefaultRule(), but this function maintains a constant
|
| -// static reference to it. The constant static reference avoids re-parsing the
|
| -// default region data.
|
| -const Rule& GetDefaultRule() {
|
| - static const Rule& kDefaultRule(InitDefaultRule());
|
| - return kDefaultRule;
|
| -}
|
| -
|
| int GetMessageIdForField(AddressField field,
|
| int admin_area_name_message_id,
|
| int postal_code_name_message_id) {
|
| @@ -88,7 +70,7 @@ std::vector<AddressUiComponent> BuildComponents(
|
| std::vector<AddressUiComponent> result;
|
|
|
| Rule rule;
|
| - rule.CopyFrom(GetDefaultRule());
|
| + rule.CopyFrom(Rule::GetDefault());
|
| if (!rule.ParseSerializedRule(
|
| RegionDataConstants::GetRegionData(region_code))) {
|
| return result;
|
|
|