| Index: chrome/browser/policy/device_management_service.h
|
| diff --git a/chrome/browser/policy/device_management_service.h b/chrome/browser/policy/device_management_service.h
|
| index c661b32eb7bc5e5bf1ac00535aaf00244cff66b0..e34cf27d2b4eb33168c41b0574100f333b85d403 100644
|
| --- a/chrome/browser/policy/device_management_service.h
|
| +++ b/chrome/browser/policy/device_management_service.h
|
| @@ -45,6 +45,8 @@ class DeviceManagementRequestJob {
|
| void(DeviceManagementStatus,
|
| const enterprise_management::DeviceManagementResponse&)> Callback;
|
|
|
| + typedef base::Callback<void(DeviceManagementRequestJob*)> RetryCallback;
|
| +
|
| virtual ~DeviceManagementRequestJob();
|
|
|
| // Functions for configuring the job. These should only be called before
|
| @@ -56,8 +58,15 @@ class DeviceManagementRequestJob {
|
| void SetClientID(const std::string& client_id);
|
| enterprise_management::DeviceManagementRequest* GetRequest();
|
|
|
| + // A job may automatically retry if it fails due to a temporary condition, or
|
| + // due to proxy misconfigurations. If a |retry_callback| is set then it will
|
| + // be invoked with the DeviceManagementRequestJob as an argument when that
|
| + // happens, so that the job's owner can customize the retry request before
|
| + // it's sent.
|
| + void SetRetryCallback(const RetryCallback& retry_callback);
|
| +
|
| // Starts the job. |callback| will be invoked on completion.
|
| - void Start(const DeviceManagementRequestJob::Callback& callback);
|
| + void Start(const Callback& callback);
|
|
|
| protected:
|
| typedef std::vector<std::pair<std::string, std::string> > ParameterMap;
|
| @@ -74,6 +83,7 @@ class DeviceManagementRequestJob {
|
| std::string gaia_token_;
|
| std::string dm_token_;
|
| enterprise_management::DeviceManagementRequest request_;
|
| + RetryCallback retry_callback_;
|
|
|
| Callback callback_;
|
|
|
| @@ -117,7 +127,7 @@ class DeviceManagementService : public net::URLFetcherDelegate {
|
| void Initialize();
|
|
|
| // Starts a job.
|
| - void StartJob(DeviceManagementRequestJobImpl* job, bool bypass_proxy);
|
| + void StartJob(DeviceManagementRequestJobImpl* job);
|
|
|
| // Adds a job. Caller must make sure the job pointer stays valid until the job
|
| // completes or gets canceled via RemoveJob().
|
|
|