Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1045)

Unified Diff: content/renderer/webpublicsuffixlist_impl.cc

Issue 2433583002: Reduce buggy usage of the registry controlled domain service. (Closed)
Patch Set: Review comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/webpublicsuffixlist_impl.h ('k') | extensions/common/csp_validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webpublicsuffixlist_impl.cc
diff --git a/content/renderer/webpublicsuffixlist_impl.cc b/content/renderer/webpublicsuffixlist_impl.cc
index e1e00c22be28c7c42184e38d29999cb81d9f7308..7cb7d6b2d563981c6f0ebe8b82070885b9071fd2 100644
--- a/content/renderer/webpublicsuffixlist_impl.cc
+++ b/content/renderer/webpublicsuffixlist_impl.cc
@@ -12,12 +12,13 @@ WebPublicSuffixListImpl::~WebPublicSuffixListImpl() {
}
size_t WebPublicSuffixListImpl::getPublicSuffixLength(
- const blink::WebString& host) {
- size_t result = net::registry_controlled_domains::GetRegistryLength(
- host.utf8(),
- net::registry_controlled_domains::INCLUDE_UNKNOWN_REGISTRIES,
- net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
- return result ? result : host.length();
+ const blink::WebString& canonical_host) {
+ size_t result =
+ net::registry_controlled_domains::GetCanonicalHostRegistryLength(
+ canonical_host.utf8(),
+ net::registry_controlled_domains::INCLUDE_UNKNOWN_REGISTRIES,
+ net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
+ return result ? result : canonical_host.length();
}
} // namespace content
« no previous file with comments | « content/renderer/webpublicsuffixlist_impl.h ('k') | extensions/common/csp_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698