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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 180 |
178 // Used to convert policies to preferences. | 181 // Used to convert policies to preferences. |
179 ConfigurationPolicyHandlerList handler_list_; | 182 ConfigurationPolicyHandlerList handler_list_; |
180 | 183 |
181 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 184 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
182 }; | 185 }; |
183 | 186 |
184 } // namespace policy | 187 } // namespace policy |
185 | 188 |
186 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 189 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
OLD | NEW |