chromium/components/url_formatter/spoof_checks/top_domains/top_domain_util.cc

// Copyright 2018 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/url_formatter/spoof_checks/top_domains/top_domain_util.h"
#include "base/strings/string_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"

namespace url_formatter {

namespace top_domains {

namespace {

// Minimum length of the e2LD (the registered domain name without the registry)
// to be considered for an edit distance comparison.
// Thus: 'google.com' has of length 6 ("google") and is long enough, while
//       'abc.co.uk' has a length of 3 ("abc"), and will not be considered.
const size_t kMinLengthForEditDistance =;

}  // namespace

bool IsEditDistanceCandidate(const std::string& hostname) {}

std::string HostnameWithoutRegistry(const std::string& hostname) {}

}  // namespace top_domains

}  // namespace url_formatter