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

Unified Diff: media/cast/net/cast_transport_sender_impl.cc

Issue 551883004: Cast: Let the extension control if DSCP is on or off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: media/cast/net/cast_transport_sender_impl.cc
diff --git a/media/cast/net/cast_transport_sender_impl.cc b/media/cast/net/cast_transport_sender_impl.cc
index a6b6fa4098c4e75b00212a94f228a383fae6dfa5..ae225d39123e2d6e59d9a26d1494b7948037cd83 100644
--- a/media/cast/net/cast_transport_sender_impl.cc
+++ b/media/cast/net/cast_transport_sender_impl.cc
@@ -17,6 +17,7 @@ scoped_ptr<CastTransportSender> CastTransportSender::Create(
net::NetLog* net_log,
base::TickClock* clock,
const net::IPEndPoint& remote_end_point,
+ const std::string& options,
const CastTransportStatusCallback& status_callback,
const BulkRawEventsCallback& raw_events_callback,
base::TimeDelta raw_events_callback_interval,
@@ -25,6 +26,7 @@ scoped_ptr<CastTransportSender> CastTransportSender::Create(
new CastTransportSenderImpl(net_log,
clock,
remote_end_point,
+ options,
status_callback,
raw_events_callback,
raw_events_callback_interval,
@@ -40,6 +42,7 @@ CastTransportSenderImpl::CastTransportSenderImpl(
net::NetLog* net_log,
base::TickClock* clock,
const net::IPEndPoint& remote_end_point,
+ const std::string& options,
const CastTransportStatusCallback& status_callback,
const BulkRawEventsCallback& raw_events_callback,
base::TimeDelta raw_events_callback_interval,
@@ -74,9 +77,11 @@ CastTransportSenderImpl::CastTransportSenderImpl(
raw_events_callback_interval);
}
if (transport_) {
- // The default DSCP value for cast is AF41. Which gives it a higher
- // priority over other traffic.
- transport_->SetDscp(net::DSCP_AF41);
+ if (options.find(":DSCP:") != std::string::npos) {
+ // The default DSCP value for cast is AF41. Which gives it a higher
+ // priority over other traffic.
+ transport_->SetDscp(net::DSCP_AF41);
+ }
transport_->StartReceiving(
base::Bind(&CastTransportSenderImpl::OnReceivedPacket,
weak_factory_.GetWeakPtr()));

Powered by Google App Engine
This is Rietveld 408576698