| 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 | 20 | 
| 20 namespace enterprise_management { | 21 namespace enterprise_management { | 
| 21 class DeviceManagementResponse; | 22 class DeviceManagementResponse; | 
| 22 } | 23 } | 
| 23 | 24 | 
| 24 namespace policy { | 25 namespace policy { | 
| 25 | 26 | 
| 26 class DeviceManagementRequestJob; | 27 class DeviceManagementRequestJob; | 
| 27 class DeviceManagementService; | 28 class DeviceManagementService; | 
| 28 | 29 | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 39   // 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. | 
| 40   AutoEnrollmentClient(const base::Closure& completion_callback, | 41   AutoEnrollmentClient(const base::Closure& completion_callback, | 
| 41                        DeviceManagementService* device_management_service, | 42                        DeviceManagementService* device_management_service, | 
| 42                        PrefService* local_state, | 43                        PrefService* local_state, | 
| 43                        const std::string& serial_number, | 44                        const std::string& serial_number, | 
| 44                        int power_initial, | 45                        int power_initial, | 
| 45                        int power_limit); | 46                        int power_limit); | 
| 46   virtual ~AutoEnrollmentClient(); | 47   virtual ~AutoEnrollmentClient(); | 
| 47 | 48 | 
| 48   // Registers preferences in local state. | 49   // Registers preferences in local state. | 
| 49   static void RegisterPrefs(PrefService* local_state); | 50   static void RegisterPrefs(PrefServiceSimple* local_state); | 
| 50 | 51 | 
| 51   // 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, | 
| 52   // instances returned by Create() fail immediately once Start() is invoked. | 53   // instances returned by Create() fail immediately once Start() is invoked. | 
| 53   static bool IsDisabled(); | 54   static bool IsDisabled(); | 
| 54 | 55 | 
| 55   // Convenience method to create instances of this class. | 56   // Convenience method to create instances of this class. | 
| 56   static AutoEnrollmentClient* Create(const base::Closure& completion_callback); | 57   static AutoEnrollmentClient* Create(const base::Closure& completion_callback); | 
| 57 | 58 | 
| 58   // Cancels auto-enrollment. | 59   // Cancels auto-enrollment. | 
| 59   // 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... | 
| 141   // owner has relinquished ownership. | 142   // owner has relinquished ownership. | 
| 142   base::Time time_start_; | 143   base::Time time_start_; | 
| 143   base::Time time_extra_start_; | 144   base::Time time_extra_start_; | 
| 144 | 145 | 
| 145   DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); | 146   DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); | 
| 146 }; | 147 }; | 
| 147 | 148 | 
| 148 }  // namespace policy | 149 }  // namespace policy | 
| 149 | 150 | 
| 150 #endif  // CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 151 #endif  // CHROME_BROWSER_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 
| OLD | NEW | 
|---|