Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1556)

Unified Diff: chrome/browser/extensions/api/mdns/mdns_api.cc

Issue 2876703002: [mDns] Move dns_sd_registry from extension/api/mdns to media/router/discovery/mdns (Closed)
Patch Set: rebase with master Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/mdns/mdns_api.cc
diff --git a/chrome/browser/extensions/api/mdns/mdns_api.cc b/chrome/browser/extensions/api/mdns/mdns_api.cc
index 7af397ad3759a19ca38d86b668d17a83eec85b22..63f3c23f83431904c59c281f89040a60a2cee193 100644
--- a/chrome/browser/extensions/api/mdns/mdns_api.cc
+++ b/chrome/browser/extensions/api/mdns/mdns_api.cc
@@ -36,6 +36,8 @@ bool IsServiceTypeWhitelisted(const std::string& service_type) {
} // namespace
+using DnsSdRegistry = media_router::DnsSdRegistry;
+
MDnsAPI::MDnsAPI(content::BrowserContext* context) : browser_context_(context) {
DCHECK(browser_context_);
extensions::EventRouter* event_router = EventRouter::Get(context);
@@ -79,7 +81,7 @@ void MDnsAPI::ForceDiscovery() {
DnsSdRegistry* MDnsAPI::dns_sd_registry() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!dns_sd_registry_.get()) {
- dns_sd_registry_.reset(new extensions::DnsSdRegistry());
+ dns_sd_registry_.reset(new media_router::DnsSdRegistry());
dns_sd_registry_->AddObserver(this);
}
return dns_sd_registry_.get();
@@ -146,7 +148,7 @@ void MDnsAPI::OnDnsSdEvent(const std::string& service_type,
DCHECK(thread_checker_.CalledOnValidThread());
std::vector<mdns::MDnsService> args;
- for (const DnsSdService& service : services) {
+ for (const auto& service : services) {
if (static_cast<int>(args.size()) ==
api::mdns::MAX_SERVICE_INSTANCES_PER_EVENT) {
// TODO(reddaly): This is not the most meaningful way of notifying the
« no previous file with comments | « chrome/browser/extensions/api/mdns/mdns_api.h ('k') | chrome/browser/extensions/api/mdns/mdns_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698