Index: chrome/browser/chromeos/policy/device_local_account_policy_service.h |
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service.h b/chrome/browser/chromeos/policy/device_local_account_policy_service.h |
index 3230a64e0cfccdc21b9f3bd0bc535c0a086e29e8..de766394ead77925c9eb29a6438b3099024cc59b 100644 |
--- a/chrome/browser/chromeos/policy/device_local_account_policy_service.h |
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.h |
@@ -41,6 +41,8 @@ class URLRequestContextGetter; |
namespace policy { |
+class AffiliatedCloudPolicyInvalidator; |
+class AffiliatedInvalidationServiceProvider; |
struct DeviceLocalAccount; |
class DeviceLocalAccountExternalDataService; |
class DeviceLocalAccountPolicyStore; |
@@ -52,6 +54,7 @@ class DeviceLocalAccountPolicyBroker |
: public CloudPolicyStore::Observer, |
public ComponentCloudPolicyService::Delegate { |
public: |
+ // |invalidation_service_provider| must outlive |this|. |
// |policy_update_callback| will be invoked to notify observers that the |
// policy for |account| has been updated. |
// |task_runner| is the runner for policy refresh tasks. |
@@ -62,7 +65,8 @@ class DeviceLocalAccountPolicyBroker |
scoped_refptr<DeviceLocalAccountExternalDataManager> |
external_data_manager, |
const base::Closure& policy_updated_callback, |
- const scoped_refptr<base::SequencedTaskRunner>& task_runner); |
+ const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
+ AffiliatedInvalidationServiceProvider* invalidation_service_provider); |
~DeviceLocalAccountPolicyBroker() override; |
// Initialize the broker, loading its |store_|. |
@@ -89,6 +93,8 @@ class DeviceLocalAccountPolicyBroker |
SchemaRegistry* schema_registry() { return &schema_registry_; } |
+ bool HasInvalidatorForTest() const; |
+ |
// Fire up the cloud connection for fetching policy for the account from the |
// cloud if this is an enterprise-managed device. |
void ConnectIfPossible( |
@@ -115,6 +121,7 @@ class DeviceLocalAccountPolicyBroker |
const scoped_refptr<net::URLRequestContextGetter>& request_context, |
CloudPolicyClient* client); |
+ AffiliatedInvalidationServiceProvider* const invalidation_service_provider_; |
const std::string account_id_; |
const std::string user_id_; |
const base::FilePath component_policy_cache_path_; |
@@ -127,6 +134,7 @@ class DeviceLocalAccountPolicyBroker |
CloudPolicyCore core_; |
scoped_ptr<ComponentCloudPolicyService> component_policy_service_; |
base::Closure policy_update_callback_; |
+ scoped_ptr<AffiliatedCloudPolicyInvalidator> invalidator_; |
DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyBroker); |
}; |
@@ -153,6 +161,7 @@ class DeviceLocalAccountPolicyService { |
chromeos::SessionManagerClient* session_manager_client, |
chromeos::DeviceSettingsService* device_settings_service, |
chromeos::CrosSettings* cros_settings, |
+ AffiliatedInvalidationServiceProvider* invalidation_service_provider, |
scoped_refptr<base::SequencedTaskRunner> store_background_task_runner, |
scoped_refptr<base::SequencedTaskRunner> extension_cache_task_runner, |
scoped_refptr<base::SequencedTaskRunner> |
@@ -227,6 +236,7 @@ class DeviceLocalAccountPolicyService { |
chromeos::SessionManagerClient* session_manager_client_; |
chromeos::DeviceSettingsService* device_settings_service_; |
chromeos::CrosSettings* cros_settings_; |
+ AffiliatedInvalidationServiceProvider* invalidation_service_provider_; |
DeviceManagementService* device_management_service_; |