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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.h

Issue 2486813002: Add DeviceADPolicyManager to provide AD policy. (Closed)
Patch Set: Created 4 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/chromeos/settings/device_settings_service.h
diff --git a/chrome/browser/chromeos/settings/device_settings_service.h b/chrome/browser/chromeos/settings/device_settings_service.h
index fd4fe91fc813584d2f9565867a4b4a3fbdda68f5..2e9b6fc5da69eaf198f6d699c84a01c028e37ec2 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.h
+++ b/chrome/browser/chromeos/settings/device_settings_service.h
@@ -19,6 +19,7 @@
#include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
#include "chromeos/dbus/session_manager_client.h"
#include "components/ownership/owner_settings_service.h"
+#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_validator.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "crypto/scoped_nss_types.h"
@@ -36,7 +37,7 @@ namespace chromeos {
class SessionManagerOperation;
-// Deals with the low-level interface to Chromium OS device settings. Device
+// Deals with the low-level interface to Chrome OS device settings. Device
// settings are stored in a protobuf that's protected by a cryptographic
// signature generated by a key in the device owner's possession. Key and
// settings are brokered by the session_manager daemon.
@@ -77,7 +78,8 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
public:
virtual ~Observer();
- // Indicates device ownership status changes.
+ // Indicates device ownership status changes. Not called for the transition
emaxx 2016/11/11 15:25:09 Is this special behavior for the AD case really ne
Thiemo Nagel 2016/11/16 19:11:01 I agree that this isn't pretty. Fixed.
+ // to Active Directory management.
virtual void OwnershipStatusChanged();
// Gets call after updates to the device settings.
@@ -97,7 +99,7 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
DeviceSettingsService();
~DeviceSettingsService() override;
- // To be called on startup once threads are initialized and DBus is ready.
+ // To be called on startup once threads are initialized and D-Bus is ready.
void SetSessionManager(SessionManagerClient* session_manager_client,
scoped_refptr<ownership::OwnerKeyUtil> owner_key_util);
@@ -105,6 +107,9 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
// and stops any pending operations.
void UnsetSessionManager();
+ // Value must have been read and verified through InstallAttributes.
+ void SetDeviceMode(policy::DeviceMode device_mode);
+
const enterprise_management::PolicyData* policy_data() {
return policy_data_.get();
}
@@ -120,9 +125,7 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
scoped_refptr<ownership::PublicKey> GetPublicKey();
// Returns the status generated by the last operation.
- Status status() {
- return store_status_;
- }
+ Status status() { return store_status_; }
// Triggers an attempt to pull the public half of the owner key from disk and
// load the device settings.
@@ -200,6 +203,8 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
// Updates status and invokes the callback immediately.
void HandleError(Status status, const base::Closure& callback);
+ void RunPendingOwnershipStatusCallbacks();
+
SessionManagerClient* session_manager_client_;
scoped_refptr<ownership::OwnerKeyUtil> owner_key_util_;
@@ -215,6 +220,8 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
std::unique_ptr<enterprise_management::ChromeDeviceSettingsProto>
device_settings_;
+ policy::DeviceMode device_mode_;
+
// The queue of pending operations. The first operation on the queue is
// currently active; it gets removed and destroyed once it completes.
std::deque<linked_ptr<SessionManagerOperation>> pending_operations_;

Powered by Google App Engine
This is Rietveld 408576698