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

Side by Side Diff: components/cast_channel/cast_socket_service_factory.h

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_
6 #define COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_
7
8 #include "base/lazy_instance.h"
9 #include "base/macros.h"
10 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv ice_factory.h"
11
12 namespace cast_channel {
13
14 class CastSocketService;
15
16 // TODO(crbug.com/725717): CastSocket created by one profile (browser context)
17 // could be shared with other profiles.
18 class CastSocketServiceFactory
19 : public RefcountedBrowserContextKeyedServiceFactory {
20 public:
21 // Caller needs to make sure that it passes in the same |context| instance to
22 // this function for both normal profile and incognito profile.
23 static scoped_refptr<CastSocketService> GetForBrowserContext(
24 content::BrowserContext* context);
25
26 static CastSocketServiceFactory* GetInstance();
27
28 private:
29 friend struct base::LazyInstanceTraitsBase<CastSocketServiceFactory>;
30
31 CastSocketServiceFactory();
32 ~CastSocketServiceFactory() override;
33
34 // BrowserContextKeyedServiceFactory interface.
35 content::BrowserContext* GetBrowserContextToUse(
36 content::BrowserContext* context) const override;
37
38 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
39 content::BrowserContext* context) const override;
40
41 DISALLOW_COPY_AND_ASSIGN(CastSocketServiceFactory);
42 };
43
44 } // namespace cast_channel
45
46 #endif // COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « components/cast_channel/cast_socket_service.cc ('k') | components/cast_channel/cast_socket_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698