Index: chrome/browser/policy/device_management_policy_provider.h |
diff --git a/chrome/browser/policy/device_management_policy_provider.h b/chrome/browser/policy/device_management_policy_provider.h |
index d73afc52ee1823a8e2779eb14ad91f1cf2b31bb9..e70d8d716cc73cf4d522dda53b7499b4adf97f1e 100644 |
--- a/chrome/browser/policy/device_management_policy_provider.h |
+++ b/chrome/browser/policy/device_management_policy_provider.h |
@@ -18,6 +18,7 @@ |
#include "chrome/common/notification_registrar.h" |
#include "chrome/common/notification_source.h" |
+class Profile; |
class TokenService; |
namespace policy { |
@@ -37,8 +38,7 @@ class DeviceManagementPolicyProvider |
public: |
DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list, |
DeviceManagementBackend* backend, |
- TokenService* token_service, |
- const FilePath& storage_dir); |
+ Profile* profile); |
virtual ~DeviceManagementPolicyProvider(); |
@@ -64,8 +64,16 @@ class DeviceManagementPolicyProvider |
void Shutdown(); |
private: |
+ friend class DeviceManagementPolicyProviderTest; |
+ |
class InitializeAfterIOThreadExistsTask; |
+ // Used for testing only. |
+ DeviceManagementPolicyProvider(const PolicyDefinitionList* policy_list, |
+ DeviceManagementBackend* backend, |
+ Profile* profile, |
+ DeviceTokenFetcher* token_fetcher); |
+ |
// Returns the device management backend to use for backend requests, lazily |
// creating a new one if one doesn't already exist. |
DeviceManagementBackend* GetBackend(); |
@@ -98,7 +106,7 @@ class DeviceManagementPolicyProvider |
const FilePath& user_data_dir); |
scoped_ptr<DeviceManagementBackend> backend_; |
- TokenService* token_service_; // weak |
+ Profile* profile_; // weak |
scoped_ptr<DeviceManagementPolicyCache> cache_; |
scoped_refptr<DeviceTokenFetcher> token_fetcher_; |
NotificationRegistrar registrar_; |