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

Unified Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 9403010: Add support for kiosk mode on the client. Make sure the settings are written in the lockbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nitty nit. Created 8 years, 10 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
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/browser_policy_connector.cc
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index bb6a250db4c839c50a669977cfc864ef7c5ac106..af5f6ef4326e4313408663e01b1e556c39bc6562 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -183,8 +183,11 @@ bool BrowserPolicyConnector::IsEnterpriseManaged() {
EnterpriseInstallAttributes::LockResult
BrowserPolicyConnector::LockDevice(const std::string& user) {
#if defined(OS_CHROMEOS)
- if (install_attributes_.get())
- return install_attributes_->LockDevice(user);
+ if (install_attributes_.get()) {
+ return install_attributes_->LockDevice(user,
+ device_data_store_->device_mode(),
+ device_data_store_->device_id());
+ }
#endif
return EnterpriseInstallAttributes::LOCK_BACKEND_ERROR;
@@ -216,6 +219,18 @@ std::string BrowserPolicyConnector::GetEnterpriseDomain() {
return std::string();
}
+DeviceMode BrowserPolicyConnector::GetDeviceMode() {
+#if defined(OS_CHROMEOS)
+ if (install_attributes_.get())
+ return install_attributes_->GetMode();
+ else
+ return DEVICE_MODE_UNKNOWN;
+#endif
+
+ // We only have the notion of "enterprise" device on ChromeOS for now.
+ return DEVICE_MODE_CONSUMER;
+}
+
void BrowserPolicyConnector::ResetDevicePolicy() {
#if defined(OS_CHROMEOS)
if (device_cloud_policy_subsystem_.get())
@@ -338,8 +353,7 @@ void BrowserPolicyConnector::RegisterForUserPolicy(
}
}
-const CloudPolicyDataStore*
- BrowserPolicyConnector::GetDeviceCloudPolicyDataStore() const {
+CloudPolicyDataStore* BrowserPolicyConnector::GetDeviceCloudPolicyDataStore() {
#if defined(OS_CHROMEOS)
return device_data_store_.get();
#else
@@ -347,8 +361,7 @@ const CloudPolicyDataStore*
#endif
}
-const CloudPolicyDataStore*
- BrowserPolicyConnector::GetUserCloudPolicyDataStore() const {
+CloudPolicyDataStore* BrowserPolicyConnector::GetUserCloudPolicyDataStore() {
return user_data_store_.get();
}
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698