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

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

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/chromeos/policy/device_local_account_policy_provider.cc
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc b/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
index ca40ec6395be301d49a17859bd5a98cda41f179d..aed27217077f7b31236a9b63e2ebdc4cb6e1fa5b 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
@@ -29,6 +29,8 @@ DeviceLocalAccountPolicyProvider::DeviceLocalAccountPolicyProvider(
store_initialized_(false),
waiting_for_policy_refresh_(false),
weak_factory_(this) {
+ // As the account originates from cloud, all its policies are set there, too.
+ source_ = POLICY_SOURCE_CLOUD;
bartfab (slow) 2015/09/14 14:42:25 Nit: #include "components/policy/core/common/polic
fhorschig 2015/09/16 13:52:03 Done.
service_->AddObserver(this);
UpdateFromBroker();
}
@@ -170,8 +172,12 @@ void DeviceLocalAccountPolicyProvider::UpdateFromBroker() {
it != chrome_policy_overrides_->end();
++it) {
const PolicyMap::Entry& entry = it->second;
- chrome_policy.Set(
- it->first, entry.level, entry.scope, entry.value->DeepCopy(), NULL);
+ chrome_policy.SetWithSource(it->first,
+ entry.level,
+ entry.scope,
+ entry.value->DeepCopy(),
+ NULL,
bartfab (slow) 2015/09/14 14:42:25 Nit: s/NULL/nullptr/
fhorschig 2015/09/16 13:52:03 Done.
+ POLICY_SOURCE_PROGRAMMATIC);
}
}

Powered by Google App Engine
This is Rietveld 408576698