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

Unified Diff: components/cast_channel/cast_socket_service.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: Created 3 years, 7 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.cc
diff --git a/extensions/browser/api/cast_channel/cast_socket_service.cc b/components/cast_channel/cast_socket_service.cc
similarity index 83%
rename from extensions/browser/api/cast_channel/cast_socket_service.cc
rename to components/cast_channel/cast_socket_service.cc
index bbf054220b66db044c0a6fd39517e632616580a9..b7ff1cb17492ab417e60cc223aeb50e730a35eac 100644
--- a/extensions/browser/api/cast_channel/cast_socket_service.cc
+++ b/components/cast_channel/cast_socket_service.cc
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/api/cast_channel/cast_socket_service.h"
+#include "components/cast_channel/cast_socket_service.h"
#include "base/memory/ptr_util.h"
-namespace extensions {
-namespace api {
namespace cast_channel {
int CastSocketRegistry::last_channel_id_ = 0;
@@ -27,7 +25,8 @@ int CastSocketRegistry::AddSocket(std::unique_ptr<CastSocket> socket) {
return id;
}
-std::unique_ptr<CastSocket> CastSocketRegistry::RemoveSocket(int channel_id) {
+std::unique_ptr<::cast_channel::CastSocket> CastSocketRegistry::RemoveSocket(
+ int channel_id) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(channel_id > 0);
auto socket_it = sockets_.find(channel_id);
@@ -40,7 +39,8 @@ std::unique_ptr<CastSocket> CastSocketRegistry::RemoveSocket(int channel_id) {
return socket;
}
-CastSocket* CastSocketRegistry::GetSocket(int channel_id) const {
+::cast_channel::CastSocket* CastSocketRegistry::GetSocket(
+ int channel_id) const {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(channel_id > 0);
const auto& socket_it = sockets_.find(channel_id);
@@ -58,5 +58,3 @@ CastSocketRegistry* CastSocketService::GetOrCreateSocketRegistry() {
}
} // namespace cast_channel
-} // namespace api
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698