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

Unified Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc

Issue 311613002: Add error log in case enrolled device lacks DM token. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LOG_IF(). Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
index 3796efdd7fa6a16ba4e06f8ce3e1766a4afe8c4d..327130646e22222726c80d8d50843499bbee8ced 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
#include "base/bind.h"
+#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/sequenced_task_runner.h"
#include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h"
@@ -147,6 +148,9 @@ void DeviceCloudPolicyStoreChromeOS::UpdateFromService() {
device_settings_service_->policy_data() &&
device_settings_service_->policy_data()->has_request_token();
UMA_HISTOGRAM_BOOLEAN("Enterprise.EnrolledPolicyHasDMToken", has_dm_token);
+ LOG_IF(ERROR, !has_dm_token)
+ << "Policy read on enrolled device yields no DM token! "
+ << "Status: " << status << ".";
}
switch (device_settings_service_->status()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698