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

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: fix nit. Created 8 years 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
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e92db187bb6a0f45a8f57e133673d9bc7489818f 100644
--- a/chrome/browser/policy/cloud_policy_client.h
+++ b/chrome/browser/policy/cloud_policy_client.h
@@ -12,7 +12,6 @@
#include "base/observer_list.h"
#include "base/time.h"
#include "chrome/browser/policy/cloud_policy_constants.h"
-#include "chrome/browser/policy/policy_types.h"
namespace enterprise_management {
class DeviceManagementResponse;
@@ -38,6 +37,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 +84,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 +134,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 +190,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 +199,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_;
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698