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

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

Issue 2898383002: [Extensions] Make Event::restrict_to_browser_context const. (Closed)
Patch Set: sync @tott 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 db4caa3fe4a2dd44acdb5ac46aa0a339c2011e72..854b56ddda3177ab93d0673811f11c7a0ad31cc8 100644
--- a/chrome/browser/extensions/api/mdns/mdns_api.cc
+++ b/chrome/browser/extensions/api/mdns/mdns_api.cc
@@ -174,10 +174,9 @@ void MDnsAPI::OnDnsSdEvent(const std::string& service_type,
}
std::unique_ptr<base::ListValue> results = mdns::OnServiceList::Create(args);
- std::unique_ptr<Event> event(new Event(events::MDNS_ON_SERVICE_LIST,
- mdns::OnServiceList::kEventName,
- std::move(results)));
- event->restrict_to_browser_context = browser_context_;
+ auto event = base::MakeUnique<Event>(events::MDNS_ON_SERVICE_LIST,
+ mdns::OnServiceList::kEventName,
+ std::move(results), browser_context_);
event->filter_info.SetServiceType(service_type);
// TODO(justinlin): To avoid having listeners without filters getting all

Powered by Google App Engine
This is Rietveld 408576698