Lines Matching refs:region_code
850 const string& region_code = it->id(); in PhoneNumberUtil() local
851 if (region_code == RegionCode::GetUnknown()) { in PhoneNumberUtil()
856 if (kRegionCodeForNonGeoEntity == region_code) { in PhoneNumberUtil()
860 region_to_metadata_map_->insert(std::make_pair(region_code, *it)); in PhoneNumberUtil()
866 calling_code_in_map->second->push_front(region_code); in PhoneNumberUtil()
868 calling_code_in_map->second->push_back(region_code); in PhoneNumberUtil()
873 list_with_region_code->push_back(region_code); in PhoneNumberUtil()
878 nanpa_regions_->insert(region_code); in PhoneNumberUtil()
928 const string& region_code, in GetSupportedTypesForRegion() argument
931 if (!IsValidRegionCode(region_code)) { in GetSupportedTypesForRegion()
932 LOG(WARNING) << "Invalid or unknown region code provided: " << region_code; in GetSupportedTypesForRegion()
935 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in GetSupportedTypesForRegion()
1029 void PhoneNumberUtil::GetNddPrefixForRegion(const string& region_code, in GetNddPrefixForRegion() argument
1033 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in GetNddPrefixForRegion()
1035 LOG(WARNING) << "Invalid or unknown region code (" << region_code in GetNddPrefixForRegion()
1047 bool PhoneNumberUtil::IsValidRegionCode(const string& region_code) const { in IsValidRegionCode()
1048 return (region_to_metadata_map_->find(region_code) != in IsValidRegionCode()
1066 const string& region_code) const { in GetMetadataForRegion()
1068 region_to_metadata_map_->find(region_code); in GetMetadataForRegion()
1122 string region_code; in Format() local
1123 GetRegionCodeForCountryCode(country_calling_code, ®ion_code); in Format()
1128 GetMetadataForRegionOrCallingCode(country_calling_code, region_code); in Format()
1154 string region_code; in FormatByPattern() local
1155 GetRegionCodeForCountryCode(country_calling_code, ®ion_code); in FormatByPattern()
1158 GetMetadataForRegionOrCallingCode(country_calling_code, region_code); in FormatByPattern()
1212 string region_code; in FormatNationalNumberWithCarrierCode() local
1213 GetRegionCodeForCountryCode(country_calling_code, ®ion_code); in FormatNationalNumberWithCarrierCode()
1216 GetMetadataForRegionOrCallingCode(country_calling_code, region_code); in FormatNationalNumberWithCarrierCode()
1225 int country_calling_code, const string& region_code) const { in GetMetadataForRegionOrCallingCode()
1226 return kRegionCodeForNonGeoEntity == region_code in GetMetadataForRegionOrCallingCode()
1228 : GetMetadataForRegion(region_code); in GetMetadataForRegionOrCallingCode()
1263 string region_code; in FormatNumberForMobileDialing() local
1264 GetRegionCodeForCountryCode(country_calling_code, ®ion_code); in FormatNumberForMobileDialing()
1267 if (calling_from == region_code) { in FormatNumberForMobileDialing()
1272 if ((region_code == "CO") && (number_type == FIXED_LINE)) { in FormatNumberForMobileDialing()
1276 } else if ((region_code == "BR") && (is_fixed_line_or_mobile)) { in FormatNumberForMobileDialing()
1309 if ((region_code == kRegionCodeForNonGeoEntity || in FormatNumberForMobileDialing()
1327 ((region_code == "MX" || in FormatNumberForMobileDialing()
1328 region_code == "CL" || in FormatNumberForMobileDialing()
1329 region_code == "UZ") && in FormatNumberForMobileDialing()
1413 string region_code; in FormatOutOfCountryCallingNumber() local
1414 GetRegionCodeForCountryCode(country_code, ®ion_code); in FormatOutOfCountryCallingNumber()
1417 GetMetadataForRegionOrCallingCode(country_code, region_code); in FormatOutOfCountryCallingNumber()
1461 string region_code; in FormatInOriginalFormat()
1462 GetRegionCodeForCountryCode(number.country_code(), ®ion_code); in FormatInOriginalFormat()
1466 GetNddPrefixForRegion(region_code, true /* strip non-digits */, in FormatInOriginalFormat()
1478 region_code)) { in FormatInOriginalFormat()
1485 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in FormatInOriginalFormat()
1552 const string& region_code) const { in RawInputContainsNationalPrefix()
1563 region_code, &number_without_national_prefix) in RawInputContainsNationalPrefix()
1574 string region_code; in HasFormattingPatternForNumber() local
1575 GetRegionCodeForCountryCode(country_calling_code, ®ion_code); in HasFormattingPatternForNumber()
1577 GetMetadataForRegionOrCallingCode(country_calling_code, region_code); in HasFormattingPatternForNumber()
1832 bool PhoneNumberUtil::IsNANPACountry(const string& region_code) const { in IsNANPACountry()
1833 return nanpa_regions_->find(region_code) != nanpa_regions_->end(); in IsNANPACountry()
1863 string* region_code) const { in GetRegionCodeForCountryCode()
1864 DCHECK(region_code); in GetRegionCodeForCountryCode()
1868 *region_code = (region_codes.size() > 0) ? in GetRegionCodeForCountryCode()
1873 string* region_code) const { in GetRegionCodeForNumber()
1874 DCHECK(region_code); in GetRegionCodeForNumber()
1881 *region_code = RegionCode::GetUnknown(); in GetRegionCodeForNumber()
1885 *region_code = region_codes.front(); in GetRegionCodeForNumber()
1887 GetRegionCodeForNumberFromRegionList(number, region_codes, region_code); in GetRegionCodeForNumber()
1893 string* region_code) const { in GetRegionCodeForNumberFromRegionList()
1894 DCHECK(region_code); in GetRegionCodeForNumberFromRegionList()
1907 *region_code = *it; in GetRegionCodeForNumberFromRegionList()
1911 *region_code = *it; in GetRegionCodeForNumberFromRegionList()
1915 *region_code = RegionCode::GetUnknown(); in GetRegionCodeForNumberFromRegionList()
1918 int PhoneNumberUtil::GetCountryCodeForRegion(const string& region_code) const { in GetCountryCodeForRegion()
1919 if (!IsValidRegionCode(region_code)) { in GetCountryCodeForRegion()
1920 LOG(WARNING) << "Invalid or unknown region code (" << region_code in GetCountryCodeForRegion()
1924 return GetCountryCodeForValidRegion(region_code); in GetCountryCodeForRegion()
1928 const string& region_code) const { in GetCountryCodeForValidRegion()
1929 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in GetCountryCodeForValidRegion()
1936 bool PhoneNumberUtil::GetExampleNumber(const string& region_code, in GetExampleNumber() argument
1939 return GetExampleNumberForType(region_code, FIXED_LINE, number); in GetExampleNumber()
1942 bool PhoneNumberUtil::GetInvalidExampleNumber(const string& region_code, in GetInvalidExampleNumber() argument
1945 if (!IsValidRegionCode(region_code)) { in GetInvalidExampleNumber()
1946 LOG(WARNING) << "Invalid or unknown region code (" << region_code in GetInvalidExampleNumber()
1954 const PhoneMetadata* region_metadata = GetMetadataForRegion(region_code); in GetInvalidExampleNumber()
1981 Parse(number_to_try, region_code, &possibly_valid_number); in GetInvalidExampleNumber()
1999 const string& region_code, in GetExampleNumberForType() argument
2003 if (!IsValidRegionCode(region_code)) { in GetExampleNumberForType()
2004 LOG(WARNING) << "Invalid or unknown region code (" << region_code in GetExampleNumberForType()
2008 const PhoneMetadata* region_metadata = GetMetadataForRegion(region_code); in GetExampleNumberForType()
2011 ErrorType success = Parse(desc->example_number(), region_code, number); in GetExampleNumberForType()
2028 for (const string& region_code : regions) { in GetExampleNumberForType() local
2029 if (GetExampleNumberForType(region_code, type, number)) { in GetExampleNumberForType()
2402 string region_code; in IsPossibleNumberForTypeWithReason() local
2403 GetRegionCodeForCountryCode(country_code, ®ion_code); in IsPossibleNumberForTypeWithReason()
2406 GetMetadataForRegionOrCallingCode(country_code, region_code); in IsPossibleNumberForTypeWithReason()
2430 string region_code; in GetNumberType() local
2431 GetRegionCodeForNumber(number, ®ion_code); in GetNumberType()
2433 GetMetadataForRegionOrCallingCode(number.country_code(), region_code); in GetNumberType()
2443 string region_code; in IsValidNumber() local
2444 GetRegionCodeForNumber(number, ®ion_code); in IsValidNumber()
2445 return IsValidNumberForRegion(number, region_code); in IsValidNumber()
2449 const string& region_code) const { in IsValidNumberForRegion()
2452 GetMetadataForRegionOrCallingCode(country_code, region_code); in IsValidNumberForRegion()
2454 ((kRegionCodeForNonGeoEntity != region_code) && in IsValidNumberForRegion()
2455 country_code != GetCountryCodeForValidRegion(region_code))) { in IsValidNumberForRegion()
2597 string region_code; in GetLengthOfGeographicalAreaCode() local
2598 GetRegionCodeForNumber(number, ®ion_code); in GetLengthOfGeographicalAreaCode()
2599 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in GetLengthOfGeographicalAreaCode()
2953 string region_code; in ExtractCountryCode() local
2954 GetRegionCodeForCountryCode(potential_country_code, ®ion_code); in ExtractCountryCode()
2955 if (region_code != RegionCode::GetUnknown()) { in ExtractCountryCode()
3178 const string& region_code) const { in GetAsYouTypeFormatter()
3179 return new AsYouTypeFormatter(region_code); in GetAsYouTypeFormatter()
3184 string region_code; in CanBeInternationallyDialled() local
3185 GetRegionCodeForNumber(number, ®ion_code); in CanBeInternationallyDialled()
3186 const PhoneMetadata* metadata = GetMetadataForRegion(region_code); in CanBeInternationallyDialled()