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

Unified Diff: chrome/browser/policy/cloud_policy_client.h

Issue 11434053: Add support for public account policy to CloudPolicyClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 1 month 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/policy/cloud_policy_client.h
diff --git a/chrome/browser/policy/cloud_policy_client.h b/chrome/browser/policy/cloud_policy_client.h
index 0ebfcd00128ad063e2283208e7efafc74fe188a7..f1abfe801620b61f55fc9275f72449d0cffbc56d 100644
--- a/chrome/browser/policy/cloud_policy_client.h
+++ b/chrome/browser/policy/cloud_policy_client.h
@@ -38,6 +38,13 @@ class DeviceManagementService;
// installed in the cloud policy cache.
class CloudPolicyClient {
public:
+ // Indicates the type of policy the client should register for and fetch.
+ enum PolicyType {
+ POLICY_TYPE_DEVICE,
+ POLICY_TYPE_USER,
+ POLICY_TYPE_PUBLIC_ACCOUNT,
+ };
+
// Observer interface for state and policy changes.
class Observer {
public:
@@ -78,7 +85,7 @@ class CloudPolicyClient {
CloudPolicyClient(const std::string& machine_id,
const std::string& machine_model,
UserAffiliation user_affiliation,
- PolicyScope scope,
+ PolicyType policy_type,
StatusProvider* provider,
DeviceManagementService* service);
virtual ~CloudPolicyClient();
@@ -128,6 +135,10 @@ class CloudPolicyClient {
public_key_version_valid_ = false;
}
+ void set_entity_id(const std::string& entity_id) {
+ entity_id_ = entity_id;
+ }
+
// Whether the client is registered with the device management service.
bool is_registered() const { return !dm_token_.empty(); }
@@ -180,7 +191,7 @@ class CloudPolicyClient {
const std::string machine_id_;
const std::string machine_model_;
const UserAffiliation user_affiliation_;
- const PolicyScope scope_;
+ const PolicyType type_;
std::string dm_token_;
DeviceMode device_mode_;
@@ -189,6 +200,7 @@ class CloudPolicyClient {
base::Time last_policy_timestamp_;
int public_key_version_;
bool public_key_version_valid_;
+ std::string entity_id_;
// Used for issuing requests to the cloud.
DeviceManagementService* service_;

Powered by Google App Engine
This is Rietveld 408576698