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

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: Fixed another test. 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..8d92faec03efbf52f8937124d297b49eb09a6c3b 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
@@ -15,6 +15,7 @@
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_namespace.h"
+#include "components/policy/core/common/policy_types.h"
#include "policy/policy_constants.h"
namespace policy {
@@ -59,6 +60,7 @@ DeviceLocalAccountPolicyProvider::Create(
key::kLidCloseAction,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
+ POLICY_SOURCE_ENTERPRISE_OVERRIDE,
new base::FundamentalValue(
chromeos::PowerPolicyController::ACTION_STOP_SESSION),
NULL);
@@ -68,6 +70,7 @@ DeviceLocalAccountPolicyProvider::Create(
key::kShelfAutoHideBehavior,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
+ POLICY_SOURCE_ENTERPRISE_OVERRIDE,
new base::StringValue("Never"),
NULL);
// Force the |ShowLogoutButtonInTray| policy to |true|, ensuring that a big,
@@ -76,6 +79,7 @@ DeviceLocalAccountPolicyProvider::Create(
key::kShowLogoutButtonInTray,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
+ POLICY_SOURCE_ENTERPRISE_OVERRIDE,
new base::FundamentalValue(true),
NULL);
// Force the |FullscreenAllowed| policy to |false|, ensuring that the ash
@@ -84,6 +88,7 @@ DeviceLocalAccountPolicyProvider::Create(
key::kFullscreenAllowed,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
+ POLICY_SOURCE_ENTERPRISE_OVERRIDE,
new base::FundamentalValue(false),
NULL);
}
@@ -170,8 +175,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.Set(it->first,
+ entry.level,
+ entry.scope,
+ entry.source,
+ entry.value->DeepCopy(),
+ nullptr);
}
}

Powered by Google App Engine
This is Rietveld 408576698