MCPcopy Create free account
hub / github.com/NativeScript/android / update_host_to_base_host

Method update_host_to_base_host

test-app/runtime/src/main/cpp/ada/ada.h:8418–8438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8416}
8417
8418void url_aggregator::update_host_to_base_host(
8419 const std::string_view input) noexcept {
8420 ada_log("url_aggregator::update_host_to_base_host ", input);
8421 ADA_ASSERT_TRUE(validate());
8422 ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
8423 if (type != ada::scheme::type::FILE) {
8424 // Let host be the result of host parsing host_view with url is not special.
8425 if (input.empty() && !is_special()) {
8426 if (has_hostname()) {
8427 clear_hostname();
8428 } else if (has_dash_dot()) {
8429 add_authority_slashes_if_needed();
8430 delete_dash_dot();
8431 }
8432 return;
8433 }
8434 }
8435 update_base_hostname(input);
8436 ADA_ASSERT_TRUE(validate());
8437 return;
8438}
8439} // namespace ada
8440
8441#endif // ADA_URL_AGGREGATOR_INL_H

Callers 1

parse_url_implFunction · 0.80

Calls 3

overlapsFunction · 0.85
is_specialFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected