Only activate DnsSdDeviceLister::Discover() when possible.
If the ENABLE_SERVICE_DISCOVERY build flag is not set, then this code will never work correctly, because DnsSdRegistry will not pass in a valid ServiceDiscoverySharedClient. So just make Discover() a no-op in this case, guarded by ENABLE_SERVICE_DISCOVERY. This in turn, makes some DnsSdDeviceLister member variables only used when ENABLE_SERVICE_DISCOVERY is set, so guard them by the same build flag. Bug: 757530 Change-Id: I2f0864e1342be3d6328fbf449dc2296825fe1fbc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1716102Reviewed-by:Takumi Fujimoto <takumif@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#680473}
Showing
Please register or sign in to comment