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

Unified Diff: chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h

Issue 2974523002: [cast_channel] Make CastSocketService a global leaky singleton (Closed)
Patch Set: merge with master Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
diff --git a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
index 2030c055fb8ae148ab6724d52968c79c34f86a9f..df6e60ebef2fde0c425a8dc8efa05d1fc4dfff88 100644
--- a/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
+++ b/chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h
@@ -16,6 +16,7 @@
#include "chrome/browser/media/router/discovery/media_sink_service_base.h"
#include "components/cast_channel/cast_channel_enum.h"
#include "components/cast_channel/cast_socket.h"
+#include "content/public/browser/browser_thread.h"
#include "net/base/ip_endpoint.h"
namespace cast_channel {
@@ -119,8 +120,13 @@ class CastMediaSinkService
// Service list from current round of discovery.
DnsSdRegistry::DnsSdServiceList current_services_;
- // Service managing creating and removing cast channels.
- scoped_refptr<cast_channel::CastSocketService> cast_socket_service_;
+ // Raw pointer of leaky singleton CastSocketService, which manages creating
+ // and removing Cast sockets.
+ cast_channel::CastSocketService* const cast_socket_service_;
+
+ std::unique_ptr<cast_channel::CastSocket::Observer,
+ content::BrowserThread::DeleteOnIOThread>
+ observer_;
THREAD_CHECKER(thread_checker_);
« no previous file with comments | « no previous file | chrome/browser/media/router/discovery/mdns/cast_media_sink_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698