Commit 9eff856d authored by noamsml@chromium.org's avatar noamsml@chromium.org

Send mdns queries for devices on network change

When changing networks, send a new mdns query for devices,
since the device list was flushed.

Review URL: https://codereview.chromium.org/463253002

Cr-Commit-Position: refs/heads/master@{#289230}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289230 0039d316-1c4b-4281-b951-d872f2087c98
parent 80be3388
...@@ -35,11 +35,11 @@ DnsSdRegistry::ServiceTypeData::~ServiceTypeData() {} ...@@ -35,11 +35,11 @@ DnsSdRegistry::ServiceTypeData::~ServiceTypeData() {}
void DnsSdRegistry::ServiceTypeData::ListenerAdded() { void DnsSdRegistry::ServiceTypeData::ListenerAdded() {
ref_count++; ref_count++;
}; }
bool DnsSdRegistry::ServiceTypeData::ListenerRemoved() { bool DnsSdRegistry::ServiceTypeData::ListenerRemoved() {
return --ref_count == 0; return --ref_count == 0;
}; }
int DnsSdRegistry::ServiceTypeData::GetListenerCount() { int DnsSdRegistry::ServiceTypeData::GetListenerCount() {
return ref_count; return ref_count;
...@@ -71,7 +71,7 @@ bool DnsSdRegistry::ServiceTypeData::UpdateService( ...@@ -71,7 +71,7 @@ bool DnsSdRegistry::ServiceTypeData::UpdateService(
<< ", known: " << known << ", known: " << known
<< ", updated or added: " << updated_or_added; << ", updated or added: " << updated_or_added;
return updated_or_added; return updated_or_added;
}; }
bool DnsSdRegistry::ServiceTypeData::RemoveService( bool DnsSdRegistry::ServiceTypeData::RemoveService(
const std::string& service_name) { const std::string& service_name) {
...@@ -83,9 +83,11 @@ bool DnsSdRegistry::ServiceTypeData::RemoveService( ...@@ -83,9 +83,11 @@ bool DnsSdRegistry::ServiceTypeData::RemoveService(
} }
} }
return false; return false;
}; }
bool DnsSdRegistry::ServiceTypeData::ClearServices() { bool DnsSdRegistry::ServiceTypeData::ClearServices() {
lister_->Discover(false);
if (service_list_.empty()) if (service_list_.empty())
return false; return false;
......
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