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_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
6 #define CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 6 #define CHROME_BROWSER_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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/policy/cloud_policy_constants.h" | 15 #include "chrome/browser/policy/cloud_policy_constants.h" |
16 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 16 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
17 | 17 |
18 class PrefService; | 18 class PrefService; |
19 class PrefServiceSimple; | 19 class PrefRegistrySimple; |
20 | 20 |
21 namespace enterprise_management { | 21 namespace enterprise_management { |
22 class DeviceManagementResponse; | 22 class DeviceManagementResponse; |
23 } | 23 } |
24 | 24 |
25 namespace policy { | 25 namespace policy { |
26 | 26 |
27 class DeviceManagementRequestJob; | 27 class DeviceManagementRequestJob; |
28 class DeviceManagementService; | 28 class DeviceManagementService; |
29 | 29 |
(...skipping 10 matching lines...) Expand all Loading... |
40 // will be the initial modulus and the maximum modulus used by this client. | 40 // will be the initial modulus and the maximum modulus used by this client. |
41 AutoEnrollmentClient(const base::Closure& completion_callback, | 41 AutoEnrollmentClient(const base::Closure& completion_callback, |
42 DeviceManagementService* device_management_service, | 42 DeviceManagementService* device_management_service, |
43 PrefService* local_state, | 43 PrefService* local_state, |
44 const std::string& serial_number, | 44 const std::string& serial_number, |
45 int power_initial, | 45 int power_initial, |
46 int power_limit); | 46 int power_limit); |
47 virtual ~AutoEnrollmentClient(); | 47 virtual ~AutoEnrollmentClient(); |
48 | 48 |
49 // Registers preferences in local state. | 49 // Registers preferences in local state. |
50 static void RegisterPrefs(PrefServiceSimple* local_state); | 50 static void RegisterPrefs(PrefRegistrySimple* registry); |
51 | 51 |
52 // Returns true if auto-enrollment is disabled in this device. In that case, | 52 // Returns true if auto-enrollment is disabled in this device. In that case, |
53 // instances returned by Create() fail immediately once Start() is invoked. | 53 // instances returned by Create() fail immediately once Start() is invoked. |
54 static bool IsDisabled(); | 54 static bool IsDisabled(); |
55 | 55 |
56 // Convenience method to create instances of this class. | 56 // Convenience method to create instances of this class. |
57 static AutoEnrollmentClient* Create(const base::Closure& completion_callback); | 57 static AutoEnrollmentClient* Create(const base::Closure& completion_callback); |
58 | 58 |
59 // Cancels auto-enrollment. | 59 // Cancels auto-enrollment. |
60 // This function does not interrupt a running auto-enrollment check. It only | 60 // This function does not interrupt a running auto-enrollment check. It only |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // owner has relinquished ownership. | 142 // owner has relinquished ownership. |
143 base::Time time_start_; | 143 base::Time time_start_; |
144 base::Time time_extra_start_; | 144 base::Time time_extra_start_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); | 146 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace policy | 149 } // namespace policy |
150 | 150 |
151 #endif // CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 151 #endif // CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
OLD | NEW |