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

Side by Side Diff: chrome/browser/tether/tether_service_factory.h

Issue 2819713002: Create TetherService, a TetherAllowed pref, and use DependencyManager for RegisterProfilePrefs call… (Closed)
Patch Set: Do not explicitly call on TetherService::Shutdown() from UserSessionManager. Created 3 years, 8 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 CHROME_BROWSER_TETHER_TETHER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_TETHER_TETHER_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/tether/tether_service.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace base {
17 template <typename T>
18 struct DefaultSingletonTraits;
19 }
20
21 // Singleton factory that builds and owns all TetherServices.
22 class TetherServiceFactory : public BrowserContextKeyedServiceFactory {
23 public:
24 static TetherServiceFactory* GetInstance();
25
26 static TetherService* GetForBrowserContext(
27 content::BrowserContext* browser_context);
28
29 private:
30 friend struct base::DefaultSingletonTraits<TetherServiceFactory>;
31
32 TetherServiceFactory();
33 ~TetherServiceFactory() override;
34
35 // BrowserContextKeyedServiceFactory:
36 KeyedService* BuildServiceInstanceFor(
37 content::BrowserContext* context) const override;
38 void RegisterProfilePrefs(
39 user_prefs::PrefRegistrySyncable* registry) override;
40
41 DISALLOW_COPY_AND_ASSIGN(TetherServiceFactory);
42 };
43
44 #endif // CHROME_BROWSER_TETHER_TETHER_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698