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

Unified Diff: extensions/browser/api/cast_channel/cast_socket_service_factory.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: fix buildbot compile errors 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: extensions/browser/api/cast_channel/cast_socket_service_factory.cc
diff --git a/extensions/browser/api/cast_channel/cast_socket_service_factory.cc b/extensions/browser/api/cast_channel/cast_socket_service_factory.cc
deleted file mode 100644
index 88e1893a62a0149cee5c968a6a3dac82ccd30680..0000000000000000000000000000000000000000
--- a/extensions/browser/api/cast_channel/cast_socket_service_factory.cc
+++ /dev/null
@@ -1,57 +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 "extensions/browser/api/cast_channel/cast_socket_service_factory.h"
-
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "extensions/browser/api/cast_channel/cast_socket_service.h"
-
-namespace extensions {
-namespace api {
-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
-} // namespace api
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698