OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTORY_ H_ |
Peter Beverloo
2015/02/25 23:55:05
nit: blank line above here & copyright year
kbalazs
2015/02/27 22:40:36
Done.
| |
5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTORY_H_ | 5 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTORY_ H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTORY_H_ | |
7 | 6 |
8 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" | 8 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" |
10 | 9 |
11 class Profile; | 10 class Profile; |
12 | 11 |
13 namespace gcm { | |
14 | |
15 class PushMessagingPermissionContext; | 12 class PushMessagingPermissionContext; |
16 | 13 |
17 class PushMessagingPermissionContextFactory | 14 class PushMessagingPermissionContextFactory |
18 : public BrowserContextKeyedServiceFactory { | 15 : public BrowserContextKeyedServiceFactory { |
19 public: | 16 public: |
20 static PushMessagingPermissionContext* GetForProfile(Profile* profile); | 17 static PushMessagingPermissionContext* GetForProfile(Profile* profile); |
21 static PushMessagingPermissionContextFactory* GetInstance(); | 18 static PushMessagingPermissionContextFactory* GetInstance(); |
22 | 19 |
23 private: | 20 private: |
24 friend struct DefaultSingletonTraits<PushMessagingPermissionContextFactory>; | 21 friend struct DefaultSingletonTraits<PushMessagingPermissionContextFactory>; |
25 | 22 |
26 PushMessagingPermissionContextFactory(); | 23 PushMessagingPermissionContextFactory(); |
27 ~PushMessagingPermissionContextFactory() override; | 24 ~PushMessagingPermissionContextFactory() override; |
28 | 25 |
29 // BrowserContextKeyedBaseFactory methods: | 26 // BrowserContextKeyedBaseFactory methods: |
30 KeyedService* BuildServiceInstanceFor( | 27 KeyedService* BuildServiceInstanceFor( |
31 content::BrowserContext* profile) const override; | 28 content::BrowserContext* profile) const override; |
32 content::BrowserContext* GetBrowserContextToUse( | 29 content::BrowserContext* GetBrowserContextToUse( |
33 content::BrowserContext* context) const override; | 30 content::BrowserContext* context) const override; |
34 | 31 |
35 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContextFactory); | 32 DISALLOW_COPY_AND_ASSIGN(PushMessagingPermissionContextFactory); |
36 }; | 33 }; |
37 | 34 |
38 } // namespace gcm | 35 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTO RY_H_ |
39 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_PERMISSION_CONTEXT_FACTORY _H_ | |
OLD | NEW |