OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DEVICE_MANAGEMENT_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_SERVICE_H_ |
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_SERVICE_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 explicit DeviceManagementService(const std::string& server_url); | 52 explicit DeviceManagementService(const std::string& server_url); |
53 virtual ~DeviceManagementService(); | 53 virtual ~DeviceManagementService(); |
54 | 54 |
55 // Constructs a device management backend for use by client code. Ownership of | 55 // Constructs a device management backend for use by client code. Ownership of |
56 // the returned backend object is transferred to the caller. | 56 // the returned backend object is transferred to the caller. |
57 // Marked virtual for the benefit of tests. | 57 // Marked virtual for the benefit of tests. |
58 virtual DeviceManagementBackend* CreateBackend(); | 58 virtual DeviceManagementBackend* CreateBackend(); |
59 | 59 |
60 // Schedules a task to run |Initialize| after |delay_milliseconds| had passed. | 60 // Schedules a task to run |Initialize| after |delay_milliseconds| had passed. |
61 void ScheduleInitialization(int delay_milliseconds); | 61 void ScheduleInitialization(int64 delay_milliseconds); |
62 | 62 |
63 // Makes the service stop all requests and drop the reference to the request | 63 // Makes the service stop all requests and drop the reference to the request |
64 // context. | 64 // context. |
65 void Shutdown(); | 65 void Shutdown(); |
66 | 66 |
67 // Adds a job. Caller must make sure the job pointer stays valid until the job | 67 // Adds a job. Caller must make sure the job pointer stays valid until the job |
68 // completes or gets canceled via RemoveJob(). | 68 // completes or gets canceled via RemoveJob(). |
69 void AddJob(DeviceManagementJob* job); | 69 void AddJob(DeviceManagementJob* job); |
70 | 70 |
71 // Removes a job. The job will be removed and won't receive a completion | 71 // Removes a job. The job will be removed and won't receive a completion |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // Creates tasks used for running |Initialize| delayed on the UI thread. | 110 // Creates tasks used for running |Initialize| delayed on the UI thread. |
111 ScopedRunnableMethodFactory<DeviceManagementService> method_factory_; | 111 ScopedRunnableMethodFactory<DeviceManagementService> method_factory_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); | 113 DISALLOW_COPY_AND_ASSIGN(DeviceManagementService); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace policy | 116 } // namespace policy |
117 | 117 |
118 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_SERVICE_H_ | 118 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_SERVICE_H_ |
OLD | NEW |