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 <set> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 15 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
15 #include "chrome/browser/policy/chrome_browser_policy_connector.h" | 16 #include "chrome/browser/policy/chrome_browser_policy_connector.h" |
16 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
17 | 18 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 EnterpriseInstallAttributes* attributes); | 138 EnterpriseInstallAttributes* attributes); |
138 static void RemoveInstallAttributesForTesting(); | 139 static void RemoveInstallAttributesForTesting(); |
139 | 140 |
140 // Registers device refresh rate pref. | 141 // Registers device refresh rate pref. |
141 static void RegisterPrefs(PrefRegistrySimple* registry); | 142 static void RegisterPrefs(PrefRegistrySimple* registry); |
142 | 143 |
143 // DeviceCloudPolicyManagerChromeOS::Observer: | 144 // DeviceCloudPolicyManagerChromeOS::Observer: |
144 void OnDeviceCloudPolicyManagerConnected() override; | 145 void OnDeviceCloudPolicyManagerConnected() override; |
145 void OnDeviceCloudPolicyManagerDisconnected() override; | 146 void OnDeviceCloudPolicyManagerDisconnected() override; |
146 | 147 |
| 148 std::set<std::string> GetDeviceAffiliationIDs() const; |
| 149 |
147 private: | 150 private: |
148 // Set the timezone as soon as the policies are available. | 151 // Set the timezone as soon as the policies are available. |
149 void SetTimezoneIfPolicyAvailable(); | 152 void SetTimezoneIfPolicyAvailable(); |
150 | 153 |
151 // Restarts the device cloud policy initializer, because the device's | 154 // Restarts the device cloud policy initializer, because the device's |
152 // registration status changed from registered to unregistered. | 155 // registration status changed from registered to unregistered. |
153 void RestartDeviceCloudPolicyInitializer(); | 156 void RestartDeviceCloudPolicyInitializer(); |
154 | 157 |
155 // Components of the device cloud policy implementation. | 158 // Components of the device cloud policy implementation. |
156 scoped_ptr<ServerBackedStateKeysBroker> state_keys_broker_; | 159 scoped_ptr<ServerBackedStateKeysBroker> state_keys_broker_; |
(...skipping 22 matching lines...) Expand all Loading... |
179 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; | 182 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; |
180 | 183 |
181 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; | 184 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; |
182 | 185 |
183 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); | 186 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); |
184 }; | 187 }; |
185 | 188 |
186 } // namespace policy | 189 } // namespace policy |
187 | 190 |
188 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ | 191 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ |
OLD | NEW |