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

Unified Diff: components/cast_channel/cast_socket_service_factory.cc

Issue 2926313002: Revert of [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: 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_factory.cc
diff --git a/components/cast_channel/cast_socket_service_factory.cc b/components/cast_channel/cast_socket_service_factory.cc
deleted file mode 100644
index bf0757d3d66d3bcc09affef8fd21f83d3c986752..0000000000000000000000000000000000000000
--- a/components/cast_channel/cast_socket_service_factory.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/cast_channel/cast_socket_service_factory.h"
-
-#include "components/cast_channel/cast_socket_service.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-
-namespace cast_channel {
-
-using content::BrowserContext;
-
-namespace {
-
-base::LazyInstance<CastSocketServiceFactory>::DestructorAtExit service_factory =
- LAZY_INSTANCE_INITIALIZER;
-} // namespace
-
-// static
-scoped_refptr<CastSocketService> CastSocketServiceFactory::GetForBrowserContext(
- BrowserContext* context) {
- DCHECK(context);
- // GetServiceForBrowserContext returns a KeyedService hence the static_cast<>
- // to construct a temporary scoped_refptr on the stack for the return value.
- return static_cast<CastSocketService*>(
- service_factory.Get().GetServiceForBrowserContext(context, true).get());
-}
-
-// static
-CastSocketServiceFactory* CastSocketServiceFactory::GetInstance() {
- return &service_factory.Get();
-}
-
-CastSocketServiceFactory::CastSocketServiceFactory()
- : RefcountedBrowserContextKeyedServiceFactory(
- "CastSocketService",
- BrowserContextDependencyManager::GetInstance()) {}
-
-CastSocketServiceFactory::~CastSocketServiceFactory() {}
-
-content::BrowserContext* CastSocketServiceFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
- return context;
-}
-
-scoped_refptr<RefcountedKeyedService>
-CastSocketServiceFactory::BuildServiceInstanceFor(
- BrowserContext* context) const {
- return make_scoped_refptr(new CastSocketService());
-}
-
-} // namespace cast_channel
« no previous file with comments | « components/cast_channel/cast_socket_service_factory.h ('k') | components/cast_channel/cast_socket_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698