Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: chrome/browser/chromeos/policy/device_local_account_policy_service.h

Issue 341043005: Wire up component cloud policy to device local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698