chromium/components/autofill/core/browser/data_model/phone_number.cc

// Copyright 2013 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/data_model/phone_number.h"

#include <limits.h>

#include <algorithm>

#include "base/check_op.h"
#include "base/feature_list.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/data_model_utils.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/autofill_country.h"
#include "components/autofill/core/browser/geo/phone_number_i18n.h"
#include "components/autofill/core/common/autofill_features.h"
#include "third_party/abseil-cpp/absl/strings/ascii.h"

namespace autofill {

namespace {

// Returns the region code for this phone number, which is an ISO 3166 2-letter
// country code.  The returned value is based on the |profile|; if the |profile|
// does not have a country code associated with it, falls back to the country
// code corresponding to the |app_locale|.
std::string GetRegion(const AutofillProfile& profile,
                      const std::string& app_locale) {}

}  // namespace

PhoneNumber::PhoneNumber(const AutofillProfile* profile) :{}

PhoneNumber::PhoneNumber(const PhoneNumber& number) :{}

PhoneNumber::~PhoneNumber() = default;

PhoneNumber& PhoneNumber::operator=(const PhoneNumber& number) {}

bool PhoneNumber::operator==(const PhoneNumber& other) const {}

void PhoneNumber::GetSupportedTypes(FieldTypeSet* supported_types) const {}

std::u16string PhoneNumber::GetRawInfo(FieldType type) const {}

void PhoneNumber::SetRawInfoWithVerificationStatus(FieldType type,
                                                   const std::u16string& value,
                                                   VerificationStatus status) {}

void PhoneNumber::GetMatchingTypes(const std::u16string& text,
                                   const std::string& app_locale,
                                   FieldTypeSet* matching_types) const {}

// Normalize phones if |type| is a whole number:
//   (650)2345678 -> 6502345678
//   1-800-FLOWERS -> 18003569377
// If the phone cannot be normalized, returns the stored value verbatim.
std::u16string PhoneNumber::GetInfoImpl(const AutofillType& type,
                                        const std::string& app_locale) const {}

bool PhoneNumber::SetInfoWithVerificationStatusImpl(
    const AutofillType& type,
    const std::u16string& value,
    const std::string& app_locale,
    VerificationStatus status) {}

void PhoneNumber::UpdateCacheIfNeeded(const std::string& app_locale) const {}

PhoneNumber::PhoneCombineHelper::PhoneCombineHelper() = default;

PhoneNumber::PhoneCombineHelper::~PhoneCombineHelper() = default;

void PhoneNumber::PhoneCombineHelper::SetInfo(FieldType field_type,
                                              const std::u16string& value) {}

bool PhoneNumber::PhoneCombineHelper::ParseNumber(
    const AutofillProfile& profile,
    const std::string& app_locale,
    std::u16string* value) const {}

// static
bool PhoneNumber::ImportPhoneNumberToProfile(
    const PhoneNumber::PhoneCombineHelper& combined_phone,
    const std::string& app_locale,
    AutofillProfile& profile) {}

bool PhoneNumber::PhoneCombineHelper::IsEmpty() const {}

}  // namespace autofill