Chromium Code Reviews| 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 2fa1821d7ca054fa369b02f37c06ae6c7036707f..6e5e4c4603bc4b03310010ed67029e8d1e058b48 100644 |
| --- a/extensions/browser/api/cast_channel/cast_socket.h |
| +++ b/extensions/browser/api/cast_channel/cast_socket.h |
| @@ -43,6 +43,7 @@ class X509Certificate; |
| namespace extensions { |
| namespace api { |
| namespace cast_channel { |
| +class AuthContext; |
| class CastMessage; |
| class Logger; |
| struct LastErrors; |
| @@ -154,6 +155,18 @@ class CastSocketImpl : public CastSocket { |
| const scoped_refptr<Logger>& logger, |
| uint64_t device_capabilities); |
| + // For test-only. |
| + // This constructor allows for setting a custom AuthContext. |
| + CastSocketImpl(const std::string& owner_extension_id, |
| + const net::IPEndPoint& ip_endpoint, |
| + ChannelAuthType channel_auth, |
| + net::NetLog* net_log, |
| + const base::TimeDelta& connect_timeout, |
| + bool keep_alive, |
| + const scoped_refptr<Logger>& logger, |
| + uint64_t device_capabilities, |
| + std::unique_ptr<AuthContext> auth_context); |
|
mark a. foltz
2017/03/10 00:47:23
const AuthContext&
ryanchung
2017/03/10 02:10:27
Done.
|
| + |
| // Ensures that the socket is closed. |
| ~CastSocketImpl() override; |
| @@ -320,6 +333,9 @@ class CastSocketImpl : public CastSocket { |
| // certificate is not yet fetched. |
| scoped_refptr<net::X509Certificate> peer_cert_; |
| + // The challenge context for the current connection. |
| + std::unique_ptr<AuthContext> auth_context_; |
|
mark a. foltz
2017/03/10 00:47:23
const AuthContext
GUID is a short string and not
ryanchung
2017/03/10 02:10:27
Done.
|
| + |
| // Reply received from the receiver to a challenge request. |
| std::unique_ptr<CastMessage> challenge_reply_; |