| Index: components/policy/core/common/cloud/device_management_service.h
|
| diff --git a/components/policy/core/common/cloud/device_management_service.h b/components/policy/core/common/cloud/device_management_service.h
|
| index cbec90ffc21c950e5b7fe77584a54182a1a3f0ea..623245e4c8507cc3a725a8f0dade902aba6b8235 100644
|
| --- a/components/policy/core/common/cloud/device_management_service.h
|
| +++ b/components/policy/core/common/cloud/device_management_service.h
|
| @@ -19,6 +19,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/strings/string_split.h"
|
| +#include "base/threading/thread_checker.h"
|
| #include "components/policy/core/common/cloud/cloud_policy_constants.h"
|
| #include "components/policy/policy_export.h"
|
| #include "net/url_request/url_fetcher_delegate.h"
|
| @@ -155,6 +156,10 @@ class POLICY_EXPORT DeviceManagementService : public net::URLFetcherDelegate {
|
| // Gets the URL that the DMServer requests are sent to.
|
| std::string GetServerUrl();
|
|
|
| + // Sets the retry delay to a shorter time to prevent browser tests from
|
| + // timing out.
|
| + static void SetRetryDelayForTesting(long retryDelayMs);
|
| +
|
| private:
|
| typedef std::map<const net::URLFetcher*,
|
| DeviceManagementRequestJobImpl*> JobFetcherMap;
|
| @@ -193,7 +198,12 @@ class POLICY_EXPORT DeviceManagementService : public net::URLFetcherDelegate {
|
| // If it is not initialized, incoming requests are queued.
|
| bool initialized_;
|
|
|
| - // Used to create tasks to run |Initialize| delayed on the UI thread.
|
| + // TaskRunner used to schedule retry attempts.
|
| + const scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
| +
|
| + base::ThreadChecker thread_checker_;
|
| +
|
| + // Used to create tasks which run delayed on the UI thread.
|
| base::WeakPtrFactory<DeviceManagementService> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DeviceManagementService);
|
|
|