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 2f9e776c1910a7346492d92bde92a21e7470b2c0..81ce2bbb02a1733b20badf51b2ef71f20388ad37 100644 |
--- a/chrome/browser/chromeos/policy/device_local_account_policy_service.h |
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.h |
@@ -11,6 +11,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/files/file_path.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
@@ -48,6 +49,7 @@ class DeviceLocalAccountPolicyBroker { |
// |task_runner| is the runner for policy refresh tasks. |
DeviceLocalAccountPolicyBroker( |
const DeviceLocalAccount& account, |
+ const base::FilePath& component_policy_cache_path, |
scoped_ptr<DeviceLocalAccountPolicyStore> store, |
scoped_refptr<DeviceLocalAccountExternalDataManager> |
external_data_manager, |
@@ -86,9 +88,15 @@ class DeviceLocalAccountPolicyBroker { |
// empty string if the policy is not present. |
std::string GetDisplayName() const; |
+ // Returns a directory where component policy for this account can be cached. |
+ // The DeviceManagementService takes care of cleaning up caches of accounts |
+ // that have been removed. |
+ base::FilePath GetComponentPolicyCachePath() const; |
+ |
private: |
const std::string account_id_; |
const std::string user_id_; |
+ const base::FilePath component_policy_cache_path_; |
const scoped_ptr<DeviceLocalAccountPolicyStore> store_; |
scoped_refptr<DeviceLocalAccountExternalDataManager> external_data_manager_; |
scoped_refptr<chromeos::DeviceLocalAccountExternalPolicyLoader> |
@@ -114,6 +122,9 @@ class DeviceLocalAccountPolicyService : public CloudPolicyStore::Observer { |
// The list of accounts has been updated. |
virtual void OnDeviceLocalAccountsChanged() = 0; |
+ |
+ // The given |broken| is about to be destroyed. |
Bernhard Bauer
2014/06/19 16:59:27
Nit: "broker"
Joao da Silva
2014/06/19 17:04:56
Done.
|
+ virtual void OnBrokerShutdown(DeviceLocalAccountPolicyBroker* broker) {} |
}; |
DeviceLocalAccountPolicyService( |
@@ -229,6 +240,10 @@ class DeviceLocalAccountPolicyService : public CloudPolicyStore::Observer { |
const scoped_ptr<chromeos::CrosSettings::ObserverSubscription> |
local_accounts_subscription_; |
+ // Path to the directory that contains the cached policies for components |
+ // for device local accounts. |
+ base::FilePath component_policy_cache_root_; |
+ |
base::WeakPtrFactory<DeviceLocalAccountPolicyService> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyService); |