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

Unified Diff: chrome/browser/media/router/media_router_mojo_impl.h

Issue 1821823002: [Media Router] Conditionally enable mDNS on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compile and build dependency issues Created 4 years, 9 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/media/router/media_router_mojo_impl.h
diff --git a/chrome/browser/media/router/media_router_mojo_impl.h b/chrome/browser/media/router/media_router_mojo_impl.h
index 35ca51e2c872408614870b106f10dcdf9677ca10..4927838b5319e591641126830414aad019baa7d0 100644
--- a/chrome/browser/media/router/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/media_router_mojo_impl.h
@@ -98,6 +98,8 @@ class MediaRouterMojoImpl : public MediaRouterBase,
const SendRouteMessageCallback& callback) override;
void AddIssue(const Issue& issue) override;
void ClearIssue(const Issue::Id& issue_id) override;
+ bool should_enable_mdns_discovery() const override;
+ void EnableMdnsDiscovery() override;
const std::string& media_route_provider_extension_id() const {
return media_route_provider_extension_id_;
@@ -381,6 +383,12 @@ class MediaRouterMojoImpl : public MediaRouterBase,
// initial event page wakeup attempt.
bool provider_version_was_recorded_ = false;
+ // A flag to ensure that mDNS discovery is only enabled on Windows when there
+ // will be appropriate context for the user to associate a firewall prompt
+ // with Media Router. This can be set to |true| earlier if we know that a
+ // prompt will not occur.
+ bool should_enable_mdns_discovery_ = true;
+
base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);

Powered by Google App Engine
This is Rietveld 408576698