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

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

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: Made registration fail on missing enrollment type. 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
Index: chrome/browser/policy/enterprise_install_attributes.h
diff --git a/chrome/browser/policy/enterprise_install_attributes.h b/chrome/browser/policy/enterprise_install_attributes.h
index 90d728a277d48dbabe7c64f767c1ae40dc5ca84e..97895e935025a4a868f8fe6f7918972a67a3096b 100644
--- a/chrome/browser/policy/enterprise_install_attributes.h
+++ b/chrome/browser/policy/enterprise_install_attributes.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "chrome/browser/policy/proto/device_management_backend.pb.h"
namespace chromeos {
class CryptohomeLibrary;
@@ -29,12 +30,22 @@ class EnterpriseInstallAttributes {
LOCK_WRONG_USER,
};
+ // List of modes that the device can be locked into.
+ enum DeviceMode {
+ DEVICE_MODE_CONSUMER,
+ DEVICE_MODE_ENTERPRISE,
+ DEVICE_MODE_KIOSK,
+ DEVICE_MODE_UNKNOWN
Mattias Nissler (ping if slow) 2012/02/20 12:22:54 Unknown should probably go first. We probably also
pastarmovj 2012/02/20 14:26:30 Done.
+ };
+
explicit EnterpriseInstallAttributes(chromeos::CryptohomeLibrary* cryptohome);
// Locks the device to be an enterprise device registered by the given user.
// This can also be called after the lock has already been taken, in which
// case it checks that the passed user agrees with the locked attribute.
- LockResult LockDevice(const std::string& user) WARN_UNUSED_RESULT;
+ LockResult LockDevice(const std::string& user,
+ DeviceMode device_mode,
+ const std::string& device_id) WARN_UNUSED_RESULT;
// Checks whether this is an enterprise device.
bool IsEnterpriseDevice();
@@ -47,6 +58,15 @@ class EnterpriseInstallAttributes {
// device is not an enterprise device.
std::string GetRegistrationUser();
+ // Gets the device id that was generated when the device was registered.
+ // Returns an empty string if the device is not an enterprise device or the
+ // device id was not stored in the lockbox (prior to R19).
+ std::string GetDeviceId();
+
+ // Gets the mode the device was enrolled to. The return value for devices that
+ // are not locked yet will be DEVICE_MODE_UNKNOWN.
+ DeviceMode GetMode();
+
private:
// Makes sure the local caches for enterprise-related install attributes are
// up-to-date with what cryptohome has.
@@ -56,6 +76,9 @@ class EnterpriseInstallAttributes {
bool device_locked_;
std::string registration_user_;
+ std::string registration_domain_;
+ std::string registration_device_id_;
+ DeviceMode registration_mode_;
DISALLOW_COPY_AND_ASSIGN(EnterpriseInstallAttributes);
};

Powered by Google App Engine
This is Rietveld 408576698