OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // previously set delegate is removed. Passing NULL removes the current | 85 // previously set delegate is removed. Passing NULL removes the current |
86 // delegate, if there is one. | 86 // delegate, if there is one. |
87 void SetUserPolicyDelegate(ConfigurationPolicyProvider* user_policy_provider); | 87 void SetUserPolicyDelegate(ConfigurationPolicyProvider* user_policy_provider); |
88 | 88 |
89 // Returns the device management service for consumer management. | 89 // Returns the device management service for consumer management. |
90 DeviceManagementService* consumer_device_management_service() const { | 90 DeviceManagementService* consumer_device_management_service() const { |
91 return consumer_device_management_service_.get(); | 91 return consumer_device_management_service_.get(); |
92 } | 92 } |
93 | 93 |
94 // Sets the install attributes for testing. Must be called before the browser | 94 // Sets the install attributes for testing. Must be called before the browser |
95 // is created. Takes ownership of |attributes|. | 95 // is created. RemoveInstallAttributesForTesting must be called after the test |
| 96 // to free the attributes. |
96 static void SetInstallAttributesForTesting( | 97 static void SetInstallAttributesForTesting( |
97 EnterpriseInstallAttributes* attributes); | 98 EnterpriseInstallAttributes* attributes); |
| 99 static void RemoveInstallAttributesForTesting(); |
98 | 100 |
99 // Registers device refresh rate pref. | 101 // Registers device refresh rate pref. |
100 static void RegisterPrefs(PrefRegistrySimple* registry); | 102 static void RegisterPrefs(PrefRegistrySimple* registry); |
101 | 103 |
102 private: | 104 private: |
103 // Set the timezone as soon as the policies are available. | 105 // Set the timezone as soon as the policies are available. |
104 void SetTimezoneIfPolicyAvailable(); | 106 void SetTimezoneIfPolicyAvailable(); |
105 | 107 |
106 // Components of the device cloud policy implementation. | 108 // Components of the device cloud policy implementation. |
107 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; | 109 scoped_ptr<EnterpriseInstallAttributes> install_attributes_; |
(...skipping 15 matching lines...) Expand all Loading... |
123 scoped_ptr<DeviceManagementService> consumer_device_management_service_; | 125 scoped_ptr<DeviceManagementService> consumer_device_management_service_; |
124 | 126 |
125 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; | 127 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; |
126 | 128 |
127 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); | 129 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); |
128 }; | 130 }; |
129 | 131 |
130 } // namespace policy | 132 } // namespace policy |
131 | 133 |
132 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 134 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
OLD | NEW |