Index: components/cast_channel/cast_socket_service.h |
diff --git a/components/cast_channel/cast_socket_service.h b/components/cast_channel/cast_socket_service.h |
index 99baf8fec1ae68362028c8b751d72faa996848cc..881d3fe1b78db26a8e3f71c41f545c8f85880666 100644 |
--- a/components/cast_channel/cast_socket_service.h |
+++ b/components/cast_channel/cast_socket_service.h |
@@ -60,7 +60,7 @@ class CastSocketService : public RefcountedKeyedService { |
// Returns the socket corresponding to |channel_id| if one exists, or nullptr |
// otherwise. |
- CastSocket* GetSocket(int channel_id) const; |
+ virtual CastSocket* GetSocket(int channel_id) const; |
// Opens cast socket with |ip_endpoint| and invokes |open_cb| when opening |
// operation finishes. If cast socket with |ip_endpoint| already exists, |
@@ -93,9 +93,9 @@ class CastSocketService : public RefcountedKeyedService { |
// |net_log|: Net log passed to cast socket. |
// |open_cb|: first parameter is channel id of newly created socket; second |
// parameter is channel error encountered during channel opening. |
- int OpenSocket(const net::IPEndPoint& ip_endpoint, |
- net::NetLog* net_log, |
- const OnOpenCallback& open_cb); |
+ virtual int OpenSocket(const net::IPEndPoint& ip_endpoint, |
+ net::NetLog* net_log, |
+ const OnOpenCallback& open_cb); |
// Register read delegate to cast socket with |channel_id|. Returns false if |
// such socket does not exist. |
@@ -109,6 +109,9 @@ class CastSocketService : public RefcountedKeyedService { |
// Sets injected ping timeout timer for testing. |
void SetPingTimeoutTimerForTest(std::unique_ptr<base::Timer> timer); |
+ protected: |
+ ~CastSocketService() override; |
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(CastSocketServiceTest, TestOpenChannel); |
friend class CastSocketServiceTest; |
@@ -133,8 +136,6 @@ class CastSocketService : public RefcountedKeyedService { |
PassThroughMessageHandler* pass_through_message_handler; |
}; |
- ~CastSocketService() override; |
- |
// RefcountedKeyedService implementation. |
void ShutdownOnUIThread() override; |