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

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: Message loop to run loop 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..92d7ad4989c4fd11e27300427bd8a5088fd2404e 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 EnsureMdnsDiscoveryEnabled() override;
const std::string& media_route_provider_extension_id() const {
return media_route_provider_extension_id_;
@@ -320,6 +322,8 @@ class MediaRouterMojoImpl : public MediaRouterBase,
// Clears the wake reason after the extension has been awoken.
void ClearWakeReason();
+ void EnableMdnsFromFirewallCheck(bool firewall_can_use_local_ports);
+
// Pending requests queued to be executed once component extension
// becomes ready.
std::deque<base::Closure> pending_requests_;
@@ -381,6 +385,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;
imcheng 2016/03/25 06:26:30 I would prefer that we define this value to be fal
btolsch 2016/03/25 18:57:04 Done.
+
base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);

Powered by Google App Engine
This is Rietveld 408576698