OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTO_ENROLLMENT_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // Returns the device_id randomly generated for the auto-enrollment requests. | 104 // Returns the device_id randomly generated for the auto-enrollment requests. |
105 // It can be reused for subsequent requests to the device management service. | 105 // It can be reused for subsequent requests to the device management service. |
106 std::string device_id() const { return device_id_; } | 106 std::string device_id() const { return device_id_; } |
107 | 107 |
108 // Current state. | 108 // Current state. |
109 AutoEnrollmentState state() const { return state_; } | 109 AutoEnrollmentState state() const { return state_; } |
110 | 110 |
111 // Implementation of net::NetworkChangeNotifier::NetworkChangeObserver: | 111 // Implementation of net::NetworkChangeNotifier::NetworkChangeObserver: |
112 virtual void OnNetworkChanged( | 112 virtual void OnNetworkChanged( |
113 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 113 net::NetworkChangeNotifier::ConnectionType type) override; |
114 | 114 |
115 private: | 115 private: |
116 typedef bool (AutoEnrollmentClient::*RequestCompletionHandler)( | 116 typedef bool (AutoEnrollmentClient::*RequestCompletionHandler)( |
117 DeviceManagementStatus, | 117 DeviceManagementStatus, |
118 int, | 118 int, |
119 const enterprise_management::DeviceManagementResponse&); | 119 const enterprise_management::DeviceManagementResponse&); |
120 | 120 |
121 // Tries to load the result of a previous execution of the protocol from | 121 // Tries to load the result of a previous execution of the protocol from |
122 // local state. Returns true if that decision has been made and is valid. | 122 // local state. Returns true if that decision has been made and is valid. |
123 bool GetCachedDecision(); | 123 bool GetCachedDecision(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // owner has relinquished ownership. | 218 // owner has relinquished ownership. |
219 base::Time time_start_; | 219 base::Time time_start_; |
220 base::Time time_extra_start_; | 220 base::Time time_extra_start_; |
221 | 221 |
222 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); | 222 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); |
223 }; | 223 }; |
224 | 224 |
225 } // namespace policy | 225 } // namespace policy |
226 | 226 |
227 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 227 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
OLD | NEW |