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

Unified Diff: extensions/browser/api/cast_channel/cast_socket.h

Issue 807723004: Cast audio only policy enforcement support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes Created 5 years, 11 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: extensions/browser/api/cast_channel/cast_socket.h
diff --git a/extensions/browser/api/cast_channel/cast_socket.h b/extensions/browser/api/cast_channel/cast_socket.h
index 2cb56a6ea538d35accf0e6dfdb705d0fa2f69bec..e9dd5c353b04cef49b4c47a9f41637e02ffb9224 100644
--- a/extensions/browser/api/cast_channel/cast_socket.h
+++ b/extensions/browser/api/cast_channel/cast_socket.h
@@ -125,7 +125,8 @@ class CastSocketImpl : public CastSocket {
ChannelAuthType channel_auth,
net::NetLog* net_log,
const base::TimeDelta& connect_timeout,
- const scoped_refptr<Logger>& logger);
+ const scoped_refptr<Logger>& logger,
+ long device_capabilities);
// Ensures that the socket is closed.
~CastSocketImpl() override;
@@ -242,6 +243,11 @@ class CastSocketImpl : public CastSocket {
void SetConnectState(proto::ConnectionState connect_state);
void SetReadyState(ReadyState ready_state);
+ // Verifies whether the socket complies with cast channel policy.
+ // Audio only channel policy mandates that a device declaring a video out
+ // capability must not have a certificate with audio only policy.
+ bool VerifyChannelPolicy(const AuthResult& result);
+
base::ThreadChecker thread_checker_;
const std::string owner_extension_id_;
@@ -294,6 +300,9 @@ class CastSocketImpl : public CastSocket {
// canceled.
bool is_canceled_;
+ // Capabilities declared by the cast device.
+ long device_capabilities_;
+
// Connection flow state machine state.
proto::ConnectionState connect_state_;

Powered by Google App Engine
This is Rietveld 408576698