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

Unified Diff: components/cast_channel/cast_socket_service.h

Issue 2927833002: [Media Router] Add CastMediaSinkService (Closed)
Patch Set: add unit tests Created 3 years, 6 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: 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;
« chrome/browser/media/router/discovery/mdns/mock_dns_sd_registry.cc ('K') | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698