| Index: third_party/libaddressinput/chromium/cpp/src/rule.cc
|
| diff --git a/third_party/libaddressinput/chromium/cpp/src/rule.cc b/third_party/libaddressinput/chromium/cpp/src/rule.cc
|
| index 1566f646d15366e093d3a438551f172406edf109..43d5c4301fcdd40beac00a152105acb0e2004110 100644
|
| --- a/third_party/libaddressinput/chromium/cpp/src/rule.cc
|
| +++ b/third_party/libaddressinput/chromium/cpp/src/rule.cc
|
| @@ -24,6 +24,7 @@
|
|
|
| #include "grit.h"
|
| #include "messages.h"
|
| +#include "region_data_constants.h"
|
| #include "util/json.h"
|
| #include "util/string_split.h"
|
|
|
| @@ -171,6 +172,18 @@ Rule::Rule()
|
|
|
| Rule::~Rule() {}
|
|
|
| +// static
|
| +const Rule& Rule::GetDefault() {
|
| + // Allocated once and leaked on shutdown.
|
| + static Rule* default_rule = NULL;
|
| + if (default_rule == NULL) {
|
| + default_rule = new Rule;
|
| + default_rule->ParseSerializedRule(
|
| + RegionDataConstants::GetDefaultRegionData());
|
| + }
|
| + return *default_rule;
|
| +}
|
| +
|
| void Rule::CopyFrom(const Rule& rule) {
|
| format_ = rule.format_;
|
| required_ = rule.required_;
|
|
|