| 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 DeviceManagementRequestJob(JobType type, | 89 DeviceManagementRequestJob(JobType type, |
| 90 const std::string& agent_parameter, | 90 const std::string& agent_parameter, |
| 91 const std::string& platform_parameter); | 91 const std::string& platform_parameter); |
| 92 | 92 |
| 93 // Appends a parameter to |query_params|. | 93 // Appends a parameter to |query_params|. |
| 94 void AddParameter(const std::string& name, const std::string& value); | 94 void AddParameter(const std::string& name, const std::string& value); |
| 95 | 95 |
| 96 // Fires the job, to be filled in by implementations. | 96 // Fires the job, to be filled in by implementations. |
| 97 virtual void Run() = 0; | 97 virtual void Run() = 0; |
| 98 | 98 |
| 99 JobType type_; |
| 99 ParameterMap query_params_; | 100 ParameterMap query_params_; |
| 100 std::string gaia_token_; | 101 std::string gaia_token_; |
| 101 std::string dm_token_; | 102 std::string dm_token_; |
| 102 enterprise_management::DeviceManagementRequest request_; | 103 enterprise_management::DeviceManagementRequest request_; |
| 103 RetryCallback retry_callback_; | 104 RetryCallback retry_callback_; |
| 104 | 105 |
| 105 Callback callback_; | 106 Callback callback_; |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 DISALLOW_COPY_AND_ASSIGN(DeviceManagementRequestJob); | 109 DISALLOW_COPY_AND_ASSIGN(DeviceManagementRequestJob); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 207 |
| 207 // Used to create tasks which run delayed on the UI thread. | 208 // Used to create tasks which run delayed on the UI thread. |
| 208 base::WeakPtrFactory<DeviceManagementService> weak_ptr_factory_; | 209 base::WeakPtrFactory<DeviceManagementService> weak_ptr_factory_; |
| 209 | 210 |
| 210 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); | 211 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); |
| 211 }; | 212 }; |
| 212 | 213 |
| 213 } // namespace policy | 214 } // namespace policy |
| 214 | 215 |
| 215 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ | 216 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ |
| OLD | NEW |