Commit cad55cd1 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Resolve namespace scope issue (components/autofill)

When building using jumbo, files get merged. This
results in a conflict with the namespace i18n.
This commit solves the issue bu specifying that the
global namespace should be used, by addind the
"::" prefix.

Bug: 869381
Change-Id: I3432251c5f91fbb1f35df6ef5a9c70337df5e21f
Reviewed-on: https://chromium-review.googlesource.com/1156601Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#579765}
parent 7e1b51c3
...@@ -77,16 +77,16 @@ void GetAddressComponents(const std::string& country_code, ...@@ -77,16 +77,16 @@ void GetAddressComponents(const std::string& country_code,
std::string* components_language_code) { std::string* components_language_code) {
DCHECK(address_components); DCHECK(address_components);
i18n::addressinput::Localization localization; ::i18n::addressinput::Localization localization;
localization.SetGetter(l10n_util::GetStringUTF8); localization.SetGetter(l10n_util::GetStringUTF8);
std::string not_used; std::string not_used;
std::vector<AddressUiComponent> components = std::vector<AddressUiComponent> components =
i18n::addressinput::BuildComponents( ::i18n::addressinput::BuildComponents(
country_code, localization, ui_language_code, country_code, localization, ui_language_code,
components_language_code ? components_language_code : &not_used); components_language_code ? components_language_code : &not_used);
if (components.empty()) { if (components.empty()) {
static const char kDefaultCountryCode[] = "US"; static const char kDefaultCountryCode[] = "US";
components = i18n::addressinput::BuildComponents( components = ::i18n::addressinput::BuildComponents(
kDefaultCountryCode, localization, ui_language_code, kDefaultCountryCode, localization, ui_language_code,
components_language_code ? components_language_code : &not_used); components_language_code ? components_language_code : &not_used);
} }
...@@ -107,31 +107,31 @@ void GetAddressComponents(const std::string& country_code, ...@@ -107,31 +107,31 @@ void GetAddressComponents(const std::string& country_code,
component->SetString(kFieldNameKey, components[i].name); component->SetString(kFieldNameKey, components[i].name);
switch (components[i].field) { switch (components[i].field) {
case i18n::addressinput::COUNTRY: case ::i18n::addressinput::COUNTRY:
component->SetString(kFieldTypeKey, kCountryField); component->SetString(kFieldTypeKey, kCountryField);
break; break;
case i18n::addressinput::ADMIN_AREA: case ::i18n::addressinput::ADMIN_AREA:
component->SetString(kFieldTypeKey, kStateField); component->SetString(kFieldTypeKey, kStateField);
break; break;
case i18n::addressinput::LOCALITY: case ::i18n::addressinput::LOCALITY:
component->SetString(kFieldTypeKey, kCityField); component->SetString(kFieldTypeKey, kCityField);
break; break;
case i18n::addressinput::DEPENDENT_LOCALITY: case ::i18n::addressinput::DEPENDENT_LOCALITY:
component->SetString(kFieldTypeKey, kDependentLocalityField); component->SetString(kFieldTypeKey, kDependentLocalityField);
break; break;
case i18n::addressinput::SORTING_CODE: case ::i18n::addressinput::SORTING_CODE:
component->SetString(kFieldTypeKey, kSortingCodeField); component->SetString(kFieldTypeKey, kSortingCodeField);
break; break;
case i18n::addressinput::POSTAL_CODE: case ::i18n::addressinput::POSTAL_CODE:
component->SetString(kFieldTypeKey, kPostalCodeField); component->SetString(kFieldTypeKey, kPostalCodeField);
break; break;
case i18n::addressinput::STREET_ADDRESS: case ::i18n::addressinput::STREET_ADDRESS:
component->SetString(kFieldTypeKey, kAddressLineField); component->SetString(kFieldTypeKey, kAddressLineField);
break; break;
case i18n::addressinput::ORGANIZATION: case ::i18n::addressinput::ORGANIZATION:
component->SetString(kFieldTypeKey, kCompanyNameField); component->SetString(kFieldTypeKey, kCompanyNameField);
break; break;
case i18n::addressinput::RECIPIENT: case ::i18n::addressinput::RECIPIENT:
component->SetString(kFieldTypeKey, kFullNameField); component->SetString(kFieldTypeKey, kFullNameField);
break; break;
} }
......
...@@ -678,7 +678,7 @@ base::string16 AutofillProfile::ConstructInferredLabel( ...@@ -678,7 +678,7 @@ base::string16 AutofillProfile::ConstructInferredLabel(
std::vector<ServerFieldType> remaining_fields; std::vector<ServerFieldType> remaining_fields;
for (size_t i = 0; i < included_fields_size && num_fields_to_use > 0; ++i) { for (size_t i = 0; i < included_fields_size && num_fields_to_use > 0; ++i) {
AddressField address_field; ::i18n::addressinput::AddressField address_field;
if (!i18n::FieldForType(included_fields[i], &address_field) || if (!i18n::FieldForType(included_fields[i], &address_field) ||
!::i18n::addressinput::IsFieldUsed(address_field, !::i18n::addressinput::IsFieldUsed(address_field,
address_region_code) || address_region_code) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment