1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef URL_URL_FEATURES_H_ 6 #define URL_URL_FEATURES_H_ 7 8 #include "base/component_export.h" 9 #include "base/feature_list.h" 10 11 namespace url { 12 13 // If you add or remove a feature related to URLs, you may need to 14 // correspondingly update the EarlyAccess allow list in app shims 15 // (chrome/app_shim/app_shim_controller.mm). See https://crbug.com/1520386 for 16 // more details. 17 18 COMPONENT_EXPORT(URL) BASE_DECLARE_FEATURE(kUseIDNA2008NonTransitional); 19 20 // Returns true if Chrome is using IDNA 2008 in Non-Transitional mode. 21 COMPONENT_EXPORT(URL) bool IsUsingIDNA2008NonTransitional(); 22 23 // Returns true if kStandardCompliantNonSpecialSchemeURLParsing feature is 24 // enabled. See url::kStandardCompliantNonSpecialSchemeURLParsing for details. 25 COMPONENT_EXPORT(URL) bool IsUsingStandardCompliantNonSpecialSchemeURLParsing(); 26 27 // Returns true if space characters should be treated as invalid in URL host 28 // parsing. 29 COMPONENT_EXPORT(URL) bool IsDisallowingSpaceCharacterInURLHostParsing(); 30 31 // When enabled, Chrome uses standard-compliant URL parsing for non-special 32 // scheme URLs. See https://crbug.com/1416006 for details. 33 COMPONENT_EXPORT(URL) 34 BASE_DECLARE_FEATURE(kStandardCompliantNonSpecialSchemeURLParsing); 35 36 // When enabled, treat space characters as invalid in URL host parsing. 37 COMPONENT_EXPORT(URL) 38 BASE_DECLARE_FEATURE(kDisallowSpaceCharacterInURLHostParsing); 39 40 } // namespace url 41 42 #endif // URL_URL_FEATURES_H_ 43