chromium/components/autofill/core/browser/geo/country_names_for_locale.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/browser/geo/country_names_for_locale.h"

#include <map>
#include <string>
#include <utility>

#include "base/check_op.h"
#include "components/autofill/core/browser/geo/country_data.h"
#include "components/autofill/core/common/autofill_l10n_util.h"
#include "third_party/icu/source/common/unicode/locid.h"
#include "ui/base/l10n/l10n_util.h"

namespace autofill {

namespace {
// Returns the ICU sort key corresponding to |str| for the given |collator|.
// Uses |buffer| as temporary storage, and might resize |buffer| as a side-
// effect. |buffer_size| should specify the |buffer|'s size, and is updated if
// the |buffer| is resized.
const std::string GetSortKey(const icu::Collator& collator,
                             const std::u16string& str,
                             std::unique_ptr<uint8_t[]>* buffer,
                             int32_t* buffer_size) {}

// Creates collator for |locale| and sets its attributes as needed.
std::unique_ptr<icu::Collator> CreateCollator(const icu::Locale& locale) {}

// Returns the mapping of country names localized to |locale| to their
// corresponding country codes. The provided |collator| should be suitable for
// the locale. The collator being null is handled gracefully by returning an
// empty map, to account for the very rare cases when the collator fails to
// initialize.
std::map<std::string, std::string> GetLocalizedNames(
    const std::string& locale,
    const icu::Collator* collator) {}

}  // namespace

CountryNamesForLocale::CountryNamesForLocale(const std::string& locale_name)
    :{}

CountryNamesForLocale::~CountryNamesForLocale() = default;

CountryNamesForLocale::CountryNamesForLocale(CountryNamesForLocale&& source)
    :{}

const std::string CountryNamesForLocale::GetCountryCode(
    const std::u16string& country_name) const {}

}  // namespace autofill