Commit f96c5dd2 authored by Mustafa Emre Acer's avatar Mustafa Emre Acer Committed by Commit Bot

Move IDN spoof checker and its tests to a separate directory

Also add meacer@ as an additional owner to this code.

Change-Id: Ie11671ebe049b8c1ac28bc5d63cb24f394d7c17d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717331Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680638}
parent 2516d42e
......@@ -12,8 +12,8 @@ jumbo_static_library("url_formatter") {
sources = [
"elide_url.cc",
"elide_url.h",
"idn_spoof_checker.cc",
"idn_spoof_checker.h",
"spoof_checks/idn_spoof_checker.cc",
"spoof_checks/idn_spoof_checker.h",
"url_fixer.cc",
"url_fixer.h",
"url_formatter.cc",
......@@ -49,6 +49,7 @@ jumbo_source_set("unit_tests") {
testonly = true
sources = [
"elide_url_unittest.cc",
"spoof_checks/idn_spoof_checker_unittest.cc",
"url_fixer_unittest.cc",
"url_formatter_unittest.cc",
]
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/url_formatter/idn_spoof_checker.h"
#include "components/url_formatter/spoof_checks/idn_spoof_checker.h"
#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_URL_FORMATTER_IDN_SPOOF_CHECKER_H_
#define COMPONENTS_URL_FORMATTER_IDN_SPOOF_CHECKER_H_
#ifndef COMPONENTS_URL_FORMATTER_SPOOF_CHECKS_IDN_SPOOF_CHECKER_H_
#define COMPONENTS_URL_FORMATTER_SPOOF_CHECKS_IDN_SPOOF_CHECKER_H_
#include <memory>
#include <string>
......@@ -97,11 +97,11 @@ class IDNSpoofChecker {
std::unique_ptr<icu::Transliterator> diacritic_remover_;
std::unique_ptr<icu::Transliterator> extra_confusable_mapper_;
FRIEND_TEST_ALL_PREFIXES(UrlFormatterTest, IDNToUnicode);
FRIEND_TEST_ALL_PREFIXES(IDNSpoofCheckerTest, IDNToUnicode);
IDNSpoofChecker(const IDNSpoofChecker&) = delete;
void operator=(const IDNSpoofChecker&) = delete;
};
} // namespace url_formatter
#endif // COMPONENTS_URL_FORMATTER_IDN_SPOOF_CHECKER_H_
#endif // COMPONENTS_URL_FORMATTER_SPOOF_CHECKS_IDN_SPOOF_CHECKER_H_
......@@ -17,7 +17,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_local_storage.h"
#include "build/build_config.h"
#include "components/url_formatter/idn_spoof_checker.h"
#include "components/url_formatter/spoof_checks/idn_spoof_checker.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "third_party/icu/source/common/unicode/uidna.h"
#include "third_party/icu/source/common/unicode/utypes.h"
......
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