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_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR
Y_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR
Y_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR
Y_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR
Y_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" | 10 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class UserNetworkConfigurationUpdaterFactory | 22 class UserNetworkConfigurationUpdaterFactory |
23 : public BrowserContextKeyedServiceFactory { | 23 : public BrowserContextKeyedServiceFactory { |
24 public: | 24 public: |
25 // Returns an existing or creates a new UserNetworkConfigurationUpdater for | 25 // Returns an existing or creates a new UserNetworkConfigurationUpdater for |
26 // |profile|. Will return NULL if this service isn't allowed for |profile|, | 26 // |profile|. Will return NULL if this service isn't allowed for |profile|, |
27 // i.e. for all but the primary user's profile. | 27 // i.e. for all but the primary user's profile. |
28 static UserNetworkConfigurationUpdater* GetForProfile(Profile* profile); | 28 static UserNetworkConfigurationUpdater* GetForProfile(Profile* profile); |
29 | 29 |
30 static UserNetworkConfigurationUpdaterFactory* GetInstance(); | 30 static UserNetworkConfigurationUpdaterFactory* GetInstance(); |
31 | 31 |
| 32 // Used in test to delay CertificateImporterCreation until the NSSDatabase is |
| 33 // ready. This is needed in some tests as the user's certificate database may |
| 34 // not get initialized in time. |
| 35 // TODO(tbarzic): Remove this when it's not needed. |
| 36 static void SetSkipCertificateImporterCreationForTest(bool skip); |
| 37 |
32 private: | 38 private: |
33 friend struct DefaultSingletonTraits<UserNetworkConfigurationUpdaterFactory>; | 39 friend struct DefaultSingletonTraits<UserNetworkConfigurationUpdaterFactory>; |
34 | 40 |
35 UserNetworkConfigurationUpdaterFactory(); | 41 UserNetworkConfigurationUpdaterFactory(); |
36 virtual ~UserNetworkConfigurationUpdaterFactory(); | 42 virtual ~UserNetworkConfigurationUpdaterFactory(); |
37 | 43 |
38 // BrowserContextKeyedServiceFactory: | 44 // BrowserContextKeyedServiceFactory: |
39 virtual content::BrowserContext* GetBrowserContextToUse( | 45 virtual content::BrowserContext* GetBrowserContextToUse( |
40 content::BrowserContext* context) const OVERRIDE; | 46 content::BrowserContext* context) const OVERRIDE; |
41 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; | 47 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; |
42 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 48 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
43 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 49 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
44 content::BrowserContext* context) const OVERRIDE; | 50 content::BrowserContext* context) const OVERRIDE; |
45 | 51 |
46 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdaterFactory); | 52 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdaterFactory); |
47 }; | 53 }; |
48 | 54 |
49 } // namespace policy | 55 } // namespace policy |
50 | 56 |
51 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FAC
TORY_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FAC
TORY_H_ |
OLD | NEW |