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

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

Issue 2544773002: Fetch policy from Active Directory at the end of enrollment (Closed)
Patch Set: Created 4 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
Index: chrome/browser/chromeos/settings/device_settings_service.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_service.cc b/chrome/browser/chromeos/settings/device_settings_service.cc
index d96df945a6f6fbdaa0c3005fcdd4f5f194169017..1c4100f6e5e646a1bf67f697b96565ad60d332ea 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.cc
+++ b/chrome/browser/chromeos/settings/device_settings_service.cc
@@ -132,6 +132,8 @@ void DeviceSettingsService::Load() {
void DeviceSettingsService::Store(
std::unique_ptr<em::PolicyFetchResponse> policy,
const base::Closure& callback) {
+ // On Active Directory managed devices policy is written only by authpolicyd.
+ DCHECK(device_mode_ != policy::DEVICE_MODE_ENTERPRISE_AD);
Roman Sorokin (ftl) 2016/12/01 12:43:19 Shouldn't that be CHECK?
Thiemo Nagel 2016/12/01 14:03:11 OK. I've also filed https://bugs.chromium.org/p/c
Enqueue(linked_ptr<SessionManagerOperation>(new StoreSettingsOperation(
base::Bind(&DeviceSettingsService::HandleCompletedOperation,
weak_factory_.GetWeakPtr(), callback),
@@ -256,9 +258,6 @@ void DeviceSettingsService::HandleCompletedOperation(
const base::Closure& callback,
SessionManagerOperation* operation,
Status status) {
- // Exactly one must be true: Active Directory management or existence of key.
- DCHECK((device_mode_ == policy::DEVICE_MODE_ENTERPRISE_AD) !=
- (operation->public_key() != nullptr));
DCHECK_EQ(operation, pending_operations_.front().get());
store_status_ = status;

Powered by Google App Engine
This is Rietveld 408576698