| 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 <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 DeviceManagementRequestJob::JobType type, | 133 DeviceManagementRequestJob::JobType type, |
| 134 net::URLRequestContextGetter* request_context); | 134 net::URLRequestContextGetter* request_context); |
| 135 | 135 |
| 136 // Schedules a task to run |Initialize| after |delay_milliseconds| had passed. | 136 // Schedules a task to run |Initialize| after |delay_milliseconds| had passed. |
| 137 void ScheduleInitialization(int64 delay_milliseconds); | 137 void ScheduleInitialization(int64 delay_milliseconds); |
| 138 | 138 |
| 139 // Makes the service stop all requests. | 139 // Makes the service stop all requests. |
| 140 void Shutdown(); | 140 void Shutdown(); |
| 141 | 141 |
| 142 // Gets the URL that the DMServer requests are sent to. | 142 // Gets the URL that the DMServer requests are sent to. |
| 143 std::string GetServerURL(); | 143 std::string GetServerUrl(); |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 typedef std::map<const net::URLFetcher*, | 146 typedef std::map<const net::URLFetcher*, |
| 147 DeviceManagementRequestJobImpl*> JobFetcherMap; | 147 DeviceManagementRequestJobImpl*> JobFetcherMap; |
| 148 typedef std::deque<DeviceManagementRequestJobImpl*> JobQueue; | 148 typedef std::deque<DeviceManagementRequestJobImpl*> JobQueue; |
| 149 | 149 |
| 150 friend class DeviceManagementRequestJobImpl; | 150 friend class DeviceManagementRequestJobImpl; |
| 151 | 151 |
| 152 // net::URLFetcherDelegate override. | 152 // net::URLFetcherDelegate override. |
| 153 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 153 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 182 | 182 |
| 183 // Used to create tasks to run |Initialize| delayed on the UI thread. | 183 // Used to create tasks to run |Initialize| delayed on the UI thread. |
| 184 base::WeakPtrFactory<DeviceManagementService> weak_ptr_factory_; | 184 base::WeakPtrFactory<DeviceManagementService> weak_ptr_factory_; |
| 185 | 185 |
| 186 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); | 186 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 } // namespace policy | 189 } // namespace policy |
| 190 | 190 |
| 191 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ | 191 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_DEVICE_MANAGEMENT_SERVICE_H_ |
| OLD | NEW |