createSanitized static method

List<FirstPartyHost> createSanitized(
  1. Map<String, Set<TracingHeaderType>> hosts,
  2. InternalLogger logger
)

Implementation

static List<FirstPartyHost> createSanitized(
    Map<String, Set<TracingHeaderType>> hosts, InternalLogger logger) {
  var firstPartyHosts = <FirstPartyHost>[];
  for (var entry in hosts.entries) {
    var sanitizedHost = _sanitizeHost(entry.key, logger);
    if (sanitizedHost != null) {
      firstPartyHosts.add(FirstPartyHost._(sanitizedHost, entry.value));
    }
  }

  return firstPartyHosts;
}