Commit 04f4f1d3 authored by Eric Orth's avatar Eric Orth Committed by Commit Bot

Rename mojo DNS config notification

DnsConfigChangeManagerClient::OnSystemDnsConfigChanged ->
DnsConfigChangeManagerClient::OnDnsConfigChanged because, as of
crrev.com/c/1783280, such notifications can now include non-system
changes added by the Chrome net stack to the effective config.

TBR=jam@chromium.org

Bug: 971411
Change-Id: If46b175497a5995442e52f66152d065b0ec9b61d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787999
Commit-Queue: Eric Orth <ericorth@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Auto-Submit: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711437}
parent 65151967
...@@ -217,7 +217,7 @@ void IntranetRedirectDetector::OnConnectionChanged( ...@@ -217,7 +217,7 @@ void IntranetRedirectDetector::OnConnectionChanged(
Restart(); Restart();
} }
void IntranetRedirectDetector::OnSystemDnsConfigChanged() { void IntranetRedirectDetector::OnDnsConfigChanged() {
Restart(); Restart();
} }
......
...@@ -77,7 +77,7 @@ class IntranetRedirectDetector ...@@ -77,7 +77,7 @@ class IntranetRedirectDetector
void OnConnectionChanged(network::mojom::ConnectionType type) override; void OnConnectionChanged(network::mojom::ConnectionType type) override;
// network::mojom::DnsConfigChangeManagerClient // network::mojom::DnsConfigChangeManagerClient
void OnSystemDnsConfigChanged() override; void OnDnsConfigChanged() override;
void SetupDnsConfigClient(); void SetupDnsConfigClient();
void OnDnsConfigClientConnectionError(); void OnDnsConfigClientConnectionError();
......
...@@ -137,7 +137,7 @@ class DnsProbeServiceImpl ...@@ -137,7 +137,7 @@ class DnsProbeServiceImpl
void ProbeDns(DnsProbeService::ProbeCallback callback) override; void ProbeDns(DnsProbeService::ProbeCallback callback) override;
// mojom::network::DnsConfigChangeManagerClient implementation: // mojom::network::DnsConfigChangeManagerClient implementation:
void OnSystemDnsConfigChanged() override; void OnDnsConfigChanged() override;
private: private:
enum State { enum State {
...@@ -225,7 +225,7 @@ void DnsProbeServiceImpl::ProbeDns(ProbeCallback callback) { ...@@ -225,7 +225,7 @@ void DnsProbeServiceImpl::ProbeDns(ProbeCallback callback) {
} }
} }
void DnsProbeServiceImpl::OnSystemDnsConfigChanged() { void DnsProbeServiceImpl::OnDnsConfigChanged() {
ClearCachedResult(); ClearCachedResult();
} }
......
...@@ -133,7 +133,7 @@ void FakeDnsConfigChangeManager::RequestNotifications( ...@@ -133,7 +133,7 @@ void FakeDnsConfigChangeManager::RequestNotifications(
void FakeDnsConfigChangeManager::SimulateDnsConfigChange() { void FakeDnsConfigChangeManager::SimulateDnsConfigChange() {
ASSERT_TRUE(client_); ASSERT_TRUE(client_);
client_->OnSystemDnsConfigChanged(); client_->OnDnsConfigChanged();
} }
} // namespace chrome_browser_net } // namespace chrome_browser_net
...@@ -28,7 +28,7 @@ void DnsConfigChangeManager::RequestNotifications( ...@@ -28,7 +28,7 @@ void DnsConfigChangeManager::RequestNotifications(
void DnsConfigChangeManager::OnDNSChanged() { void DnsConfigChangeManager::OnDNSChanged() {
for (const auto& client : clients_) for (const auto& client : clients_)
client->OnSystemDnsConfigChanged(); client->OnDnsConfigChanged();
} }
} // namespace network } // namespace network
...@@ -24,7 +24,7 @@ class TestDnsConfigChangeManagerClient ...@@ -24,7 +24,7 @@ class TestDnsConfigChangeManagerClient
manager_remote->RequestNotifications(receiver_.BindNewPipeAndPassRemote()); manager_remote->RequestNotifications(receiver_.BindNewPipeAndPassRemote());
} }
void OnSystemDnsConfigChanged() override { void OnDnsConfigChanged() override {
num_notifications_++; num_notifications_++;
if (num_notifications_ >= num_notifications_expected_) if (num_notifications_ >= num_notifications_expected_)
run_loop_.Quit(); run_loop_.Quit();
......
...@@ -294,9 +294,10 @@ interface HostResolver { ...@@ -294,9 +294,10 @@ interface HostResolver {
// A client interface that subscribes to DNS config change events from // A client interface that subscribes to DNS config change events from
// DnsConfigChangeManager. // DnsConfigChangeManager.
interface DnsConfigChangeManagerClient { interface DnsConfigChangeManagerClient {
// Notifies that a potential change has been detected in the DNS settings of // Notifies that a potential change has been detected in the DNS configuration
// the system that may affect results of host resolution. // that may affect results of host resolution. May be a change in system DNS
OnSystemDnsConfigChanged(); // settings or effective changes added on top by Chrome net code.
OnDnsConfigChanged();
}; };
// An interface that broadcasts DNS config change events. // An interface that broadcasts DNS config change events.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment