OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 13 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
14 | 14 |
15 template <typename T> struct DefaultSingletonTraits; | 15 template <typename T> |
| 16 struct base::DefaultSingletonTraits; |
16 | 17 |
17 class PrefRegistrySimple; | 18 class PrefRegistrySimple; |
18 class Profile; | 19 class Profile; |
19 | 20 |
20 namespace policy { | 21 namespace policy { |
21 | 22 |
22 class PolicyCertService; | 23 class PolicyCertService; |
23 class PolicyCertVerifier; | 24 class PolicyCertVerifier; |
24 | 25 |
25 // Factory to create PolicyCertServices. | 26 // Factory to create PolicyCertServices. |
(...skipping 16 matching lines...) Expand all Loading... |
42 | 43 |
43 // Used to mark or clear |user_id| as having used certificates pushed by | 44 // Used to mark or clear |user_id| as having used certificates pushed by |
44 // policy before. | 45 // policy before. |
45 static void SetUsedPolicyCertificates(const std::string& user_id); | 46 static void SetUsedPolicyCertificates(const std::string& user_id); |
46 static void ClearUsedPolicyCertificates(const std::string& user_id); | 47 static void ClearUsedPolicyCertificates(const std::string& user_id); |
47 static bool UsedPolicyCertificates(const std::string& user_id); | 48 static bool UsedPolicyCertificates(const std::string& user_id); |
48 | 49 |
49 static void RegisterPrefs(PrefRegistrySimple* local_state); | 50 static void RegisterPrefs(PrefRegistrySimple* local_state); |
50 | 51 |
51 private: | 52 private: |
52 friend struct DefaultSingletonTraits<PolicyCertServiceFactory>; | 53 friend struct base::DefaultSingletonTraits<PolicyCertServiceFactory>; |
53 | 54 |
54 PolicyCertServiceFactory(); | 55 PolicyCertServiceFactory(); |
55 ~PolicyCertServiceFactory() override; | 56 ~PolicyCertServiceFactory() override; |
56 | 57 |
57 // BrowserContextKeyedServiceFactory: | 58 // BrowserContextKeyedServiceFactory: |
58 KeyedService* BuildServiceInstanceFor( | 59 KeyedService* BuildServiceInstanceFor( |
59 content::BrowserContext* context) const override; | 60 content::BrowserContext* context) const override; |
60 content::BrowserContext* GetBrowserContextToUse( | 61 content::BrowserContext* GetBrowserContextToUse( |
61 content::BrowserContext* context) const override; | 62 content::BrowserContext* context) const override; |
62 void RegisterProfilePrefs( | 63 void RegisterProfilePrefs( |
63 user_prefs::PrefRegistrySyncable* registry) override; | 64 user_prefs::PrefRegistrySyncable* registry) override; |
64 bool ServiceIsNULLWhileTesting() const override; | 65 bool ServiceIsNULLWhileTesting() const override; |
65 | 66 |
66 DISALLOW_COPY_AND_ASSIGN(PolicyCertServiceFactory); | 67 DISALLOW_COPY_AND_ASSIGN(PolicyCertServiceFactory); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace policy | 70 } // namespace policy |
70 | 71 |
71 #endif // CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ | 72 #endif // CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_SERVICE_FACTORY_H_ |
OLD | NEW |