Commit 7ba32109 authored by valenting's avatar valenting
Browse files

Bug 1835805 - Remove odoh code r=necko-reviewers,jesup

parent aaac1d2e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1424,7 +1424,6 @@ testing/xpcshell/dns-packet/
testing/xpcshell/node_ip/
testing/xpcshell/node-http2/
testing/xpcshell/node-ws/
testing/xpcshell/odoh-wasm/
third_party/
toolkit/components/certviewer/content/vendor/
toolkit/components/jsoncpp/
+0 −36
Original line number Diff line number Diff line
@@ -12199,42 +12199,6 @@
  value: true
  mirror: always

# Whether to enable odoh.
- name: network.trr.odoh.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# The uri of Oblivious Proxy.
- name: network.trr.odoh.proxy_uri
  type: String
  value: ""
  mirror: never

# The host name of Oblivious Target.
- name: network.trr.odoh.target_host
  type: String
  value: ""
  mirror: never

# The uri path of the odoh uri.
- name: network.trr.odoh.target_path
  type: String
  value: ""
  mirror: never

# The minimum ttl of the DNS record that contains ODoHConfigs.
- name: network.trr.odoh.min_ttl
  type: RelaxedAtomicUint32
  value: 60
  mirror: always

# The uri indicates where to get ODoHConfigs.
- name: network.trr.odoh.configs_uri
  type: String
  value: ""
  mirror: never

# Whether to add padding in the doh dns queries (rfc 7830)
- name: network.trr.padding
  type: RelaxedAtomicBool
+0 −17
Original line number Diff line number Diff line
@@ -1001,23 +1001,6 @@ void nsLoadGroup::TelemetryReportChannel(nsITimedChannel* aTimedChannel,
                                   asyncOpen, requestStart);
  }

  if (StaticPrefs::network_trr_odoh_enabled() && !domainLookupStart.IsNull() &&
      !domainLookupEnd.IsNull()) {
    nsCOMPtr<nsIDNSService> dns = do_GetService(NS_DNSSERVICE_CONTRACTID);
    bool ODoHActivated = false;
    if (dns && NS_SUCCEEDED(dns->GetODoHActivated(&ODoHActivated)) &&
        ODoHActivated) {
      if (aDefaultRequest) {
        Telemetry::AccumulateTimeDelta(
            Telemetry::HTTP_PAGE_DNS_ODOH_LOOKUP_TIME, domainLookupStart,
            domainLookupEnd);
      } else {
        Telemetry::AccumulateTimeDelta(Telemetry::HTTP_SUB_DNS_ODOH_LOOKUP_TIME,
                                       domainLookupStart, domainLookupEnd);
      }
    }
  }

#undef HTTP_REQUEST_HISTOGRAMS
}

+0 −17
Original line number Diff line number Diff line
@@ -386,14 +386,6 @@ ChildDNSService::GetMyHostName(nsACString& result) {
  return NS_ERROR_NOT_AVAILABLE;
}

NS_IMETHODIMP
ChildDNSService::GetODoHActivated(bool* aResult) {
  NS_ENSURE_ARG(aResult);

  *aResult = mODoHActivated;
  return NS_OK;
}

void ChildDNSService::NotifyRequestDone(DNSRequestSender* aDnsRequest) {
  // We need the original flags and listener for the pending requests hash.
  nsIDNSService::DNSFlags originalFlags =
@@ -438,12 +430,6 @@ nsresult ChildDNSService::Init() {
    AddPrefObserver(prefs);
  }

  nsCOMPtr<nsIObserverService> observerService =
      mozilla::services::GetObserverService();
  if (observerService) {
    observerService->AddObserver(this, "odoh-service-activated", false);
  }

  return NS_OK;
}

@@ -489,10 +475,7 @@ ChildDNSService::Observe(nsISupports* subject, const char* topic,
  if (!strcmp(topic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
    // Reread prefs
    ReadPrefs(NS_ConvertUTF16toUTF8(data).get());
  } else if (!strcmp(topic, "odoh-service-activated")) {
    mODoHActivated = u"true"_ns.Equals(data);
  }

  return NS_OK;
}

+0 −2
Original line number Diff line number Diff line
@@ -60,8 +60,6 @@ class ChildDNSService final : public DNSServiceBase, public nsPIDNSService {
      nsIDNSListener* aListener, nsresult aReason,
      const OriginAttributes& aOriginAttributes);

  bool mODoHActivated = false;

  // We need to remember pending dns requests to be able to cancel them.
  nsClassHashtable<nsCStringHashKey, nsTArray<RefPtr<DNSRequestSender>>>
      mPendingRequests;
Loading