| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ |
| 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ | 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // The next Profile to call CreateForProfile() will get a PolicyService | 61 // The next Profile to call CreateForProfile() will get a PolicyService |
| 62 // with |provider| as its sole policy provider. This can be called multiple | 62 // with |provider| as its sole policy provider. This can be called multiple |
| 63 // times to override the policy providers for more than 1 Profile. | 63 // times to override the policy providers for more than 1 Profile. |
| 64 void PushProviderForTesting(ConfigurationPolicyProvider* provider); | 64 void PushProviderForTesting(ConfigurationPolicyProvider* provider); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 friend struct DefaultSingletonTraits<ProfilePolicyConnectorFactory>; | 67 friend struct DefaultSingletonTraits<ProfilePolicyConnectorFactory>; |
| 68 | 68 |
| 69 ProfilePolicyConnectorFactory(); | 69 ProfilePolicyConnectorFactory(); |
| 70 virtual ~ProfilePolicyConnectorFactory(); | 70 ~ProfilePolicyConnectorFactory() override; |
| 71 | 71 |
| 72 ProfilePolicyConnector* GetForProfileInternal(Profile* profile); | 72 ProfilePolicyConnector* GetForProfileInternal(Profile* profile); |
| 73 | 73 |
| 74 scoped_ptr<ProfilePolicyConnector> CreateForProfileInternal( | 74 scoped_ptr<ProfilePolicyConnector> CreateForProfileInternal( |
| 75 Profile* profile, | 75 Profile* profile, |
| 76 bool force_immediate_load); | 76 bool force_immediate_load); |
| 77 | 77 |
| 78 // BrowserContextKeyedBaseFactory: | 78 // BrowserContextKeyedBaseFactory: |
| 79 virtual void BrowserContextShutdown( | 79 void BrowserContextShutdown(content::BrowserContext* context) override; |
| 80 content::BrowserContext* context) override; | 80 void BrowserContextDestroyed(content::BrowserContext* context) override; |
| 81 virtual void BrowserContextDestroyed( | 81 void SetEmptyTestingFactory(content::BrowserContext* context) override; |
| 82 content::BrowserContext* context) override; | 82 bool HasTestingFactory(content::BrowserContext* context) override; |
| 83 virtual void SetEmptyTestingFactory( | 83 void CreateServiceNow(content::BrowserContext* context) override; |
| 84 content::BrowserContext* context) override; | |
| 85 virtual bool HasTestingFactory(content::BrowserContext* context) override; | |
| 86 virtual void CreateServiceNow(content::BrowserContext* context) override; | |
| 87 | 84 |
| 88 typedef std::map<Profile*, ProfilePolicyConnector*> ConnectorMap; | 85 typedef std::map<Profile*, ProfilePolicyConnector*> ConnectorMap; |
| 89 ConnectorMap connectors_; | 86 ConnectorMap connectors_; |
| 90 std::list<ConfigurationPolicyProvider*> test_providers_; | 87 std::list<ConfigurationPolicyProvider*> test_providers_; |
| 91 | 88 |
| 92 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnectorFactory); | 89 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnectorFactory); |
| 93 }; | 90 }; |
| 94 | 91 |
| 95 } // namespace policy | 92 } // namespace policy |
| 96 | 93 |
| 97 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ | 94 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_FACTORY_H_ |
| OLD | NEW |