Chromium Code Reviews| 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..f91fc95f22ea039e1e61ee9910cf8d0606197848 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. |
|
bartfab (slow)
2014/06/20 09:17:25
Nit: s/ a / the /
Joao da Silva
2014/06/20 11:48:46
Obsolete in the next CL
|
| + // The DeviceLocalAccountPolicyService takes care of cleaning up caches of |
|
bartfab (slow)
2014/06/20 09:17:25
Nit: s /caches of/caches belonging to/
Joao da Silva
2014/06/20 11:48:45
Obsolete in the next CL
|
| + // 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 |broker| is about to be destroyed. |
| + virtual void OnBrokerShutdown(DeviceLocalAccountPolicyBroker* broker) {} |
|
bartfab (slow)
2014/06/20 09:17:25
Nit: Instead of exposing the internal detail that
Joao da Silva
2014/06/20 11:48:45
This method has been removed.
|
| }; |
| DeviceLocalAccountPolicyService( |
| @@ -142,6 +153,8 @@ class DeviceLocalAccountPolicyService : public CloudPolicyStore::Observer { |
| // |user_id|. |
| bool IsPolicyAvailableForUser(const std::string& user_id); |
| + scoped_refptr<net::URLRequestContextGetter> request_context() const; |
| + |
| void AddObserver(Observer* observer); |
| void RemoveObserver(Observer* observer); |
| @@ -229,6 +242,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 |
|
bartfab (slow)
2014/06/20 09:17:25
Nit: s/policies/policy/
Joao da Silva
2014/06/20 11:48:45
Done.
|
| + // for device local accounts. |
|
bartfab (slow)
2014/06/20 09:17:25
Nit: s/device local/device-local/
Joao da Silva
2014/06/20 11:48:45
Done.
|
| + base::FilePath component_policy_cache_root_; |
| + |
| base::WeakPtrFactory<DeviceLocalAccountPolicyService> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyService); |