| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_POLICY_CONNECTOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Schedules initialization of the policy backend service, if the service is | 72 // Schedules initialization of the policy backend service, if the service is |
| 73 // already constructed. | 73 // already constructed. |
| 74 void ScheduleServiceInitialization(int64 delay_milliseconds); | 74 void ScheduleServiceInitialization(int64 delay_milliseconds); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 friend class ::TestingBrowserProcess; | 77 friend class ::TestingBrowserProcess; |
| 78 | 78 |
| 79 BrowserPolicyConnector(); | 79 BrowserPolicyConnector(); |
| 80 | 80 |
| 81 static BrowserPolicyConnector* CreateForTests(); |
| 81 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); | 82 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); |
| 82 static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); | 83 static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); |
| 83 | 84 |
| 84 // Constructor for tests that allows tests to use fake platform policy | 85 // Constructor for tests that allows tests to use fake platform policy |
| 85 // providers instead of using the actual ones. | 86 // providers instead of using the actual ones. |
| 86 BrowserPolicyConnector( | 87 BrowserPolicyConnector( |
| 87 ConfigurationPolicyProvider* managed_platform_provider, | 88 ConfigurationPolicyProvider* managed_platform_provider, |
| 88 ConfigurationPolicyProvider* recommended_platform_provider); | 89 ConfigurationPolicyProvider* recommended_platform_provider); |
| 89 | 90 |
| 90 // Activates the cloud policy subsystem. | 91 // Activates the cloud policy subsystem. |
| 91 void Initialize(); | 92 void Initialize(); |
| 92 | 93 |
| 93 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; | 94 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; |
| 94 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; | 95 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; |
| 95 | 96 |
| 96 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
| 97 scoped_ptr<DevicePolicyIdentityStrategy> identity_strategy_; | 98 scoped_ptr<DevicePolicyIdentityStrategy> identity_strategy_; |
| 98 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; | 99 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; |
| 99 #endif | 100 #endif |
| 100 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; | 101 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; |
| 101 | 102 |
| 102 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_; | 103 ScopedRunnableMethodFactory<BrowserPolicyConnector> method_factory_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 105 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace policy | 108 } // namespace policy |
| 108 | 109 |
| 109 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 110 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| OLD | NEW |