| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 const std::string& token, | 79 const std::string& token, |
| 80 TokenType token_type); | 80 TokenType token_type); |
| 81 | 81 |
| 82 // Returns true if this device is managed by an enterprise (as opposed to | 82 // Returns true if this device is managed by an enterprise (as opposed to |
| 83 // a local owner). | 83 // a local owner). |
| 84 bool IsEnterpriseManaged(); | 84 bool IsEnterpriseManaged(); |
| 85 | 85 |
| 86 // Locks the device to an enterprise domain. | 86 // Locks the device to an enterprise domain. |
| 87 EnterpriseInstallAttributes::LockResult LockDevice(const std::string& user); | 87 EnterpriseInstallAttributes::LockResult LockDevice(const std::string& user); |
| 88 | 88 |
| 89 // Returns the device serial number, or an empty string if not available. |
| 90 static std::string GetSerialNumber(); |
| 91 |
| 89 // Returns the enterprise domain if device is managed. | 92 // Returns the enterprise domain if device is managed. |
| 90 std::string GetEnterpriseDomain(); | 93 std::string GetEnterpriseDomain(); |
| 91 | 94 |
| 92 // Reset the device policy machinery. This stops any automatic retry behavior | 95 // Reset the device policy machinery. This stops any automatic retry behavior |
| 93 // and clears the error flags, so potential retries have a chance to succeed. | 96 // and clears the error flags, so potential retries have a chance to succeed. |
| 94 void ResetDevicePolicy(); | 97 void ResetDevicePolicy(); |
| 95 | 98 |
| 96 // Initiates device and user policy fetches, if possible. Pending fetches | 99 // Initiates device and user policy fetches, if possible. Pending fetches |
| 97 // will be cancelled. | 100 // will be cancelled. |
| 98 void FetchCloudPolicy(); | 101 void FetchCloudPolicy(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 181 |
| 179 // Used to convert policies to preferences. | 182 // Used to convert policies to preferences. |
| 180 ConfigurationPolicyHandlerList handler_list_; | 183 ConfigurationPolicyHandlerList handler_list_; |
| 181 | 184 |
| 182 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 185 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 } // namespace policy | 188 } // namespace policy |
| 186 | 189 |
| 187 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 190 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| OLD | NEW |