mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-23 14:26:18 +00:00
54 lines
2.0 KiB
Diff
54 lines
2.0 KiB
Diff
# Fix building with enable_service_discovery=false and enable_mds=false
|
|
|
|
--- a/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc
|
|
+++ b/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc
|
|
@@ -37,48 +37,22 @@ DnsSdDeviceLister::DnsSdDeviceLister(
|
|
DnsSdDeviceLister::~DnsSdDeviceLister() {}
|
|
|
|
void DnsSdDeviceLister::Discover() {
|
|
- if (!device_lister_) {
|
|
- device_lister_ = local_discovery::ServiceDiscoveryDeviceLister::Create(
|
|
- this, service_discovery_client_, service_type_);
|
|
- device_lister_->Start();
|
|
- VLOG(1) << "Started device lister for service type "
|
|
- << device_lister_->service_type();
|
|
- }
|
|
- device_lister_->DiscoverNewDevices();
|
|
- VLOG(1) << "Discovery new devices for service type "
|
|
- << device_lister_->service_type();
|
|
}
|
|
|
|
void DnsSdDeviceLister::Reset() {
|
|
- device_lister_.reset();
|
|
}
|
|
|
|
void DnsSdDeviceLister::OnDeviceChanged(
|
|
const std::string& service_type,
|
|
bool added,
|
|
const ServiceDescription& service_description) {
|
|
- DnsSdService service;
|
|
- FillServiceInfo(service_description, &service);
|
|
- VLOG(1) << "OnDeviceChanged: "
|
|
- << "service_name: " << service.service_name << ", "
|
|
- << "added: " << added << ", "
|
|
- << "service_type: " << device_lister_->service_type();
|
|
- delegate_->ServiceChanged(device_lister_->service_type(), added, service);
|
|
}
|
|
|
|
void DnsSdDeviceLister::OnDeviceRemoved(const std::string& service_type,
|
|
const std::string& service_name) {
|
|
- VLOG(1) << "OnDeviceRemoved: "
|
|
- << "service_name: " << service_name << ", "
|
|
- << "service_type: " << service_type;
|
|
- delegate_->ServiceRemoved(service_type, service_name);
|
|
}
|
|
|
|
void DnsSdDeviceLister::OnDeviceCacheFlushed(const std::string& service_type) {
|
|
- VLOG(1) << "OnDeviceCacheFlushed: "
|
|
- << "service_type: " << device_lister_->service_type();
|
|
- delegate_->ServicesFlushed(device_lister_->service_type());
|
|
- device_lister_->DiscoverNewDevices();
|
|
}
|
|
|
|
} // namespace media_router
|