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

Unified Diff: components/policy/core/common/cloud/user_cloud_policy_manager.cc

Issue 2275963004: Apply default policy values also on non-ChromeOS
Patch Set: move down into UserCloudPolicyManager[ChromeOS] Created 4 years, 4 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: components/policy/core/common/cloud/user_cloud_policy_manager.cc
diff --git a/components/policy/core/common/cloud/user_cloud_policy_manager.cc b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
index f758a0db83dae62c084552dde584625787e52bf1..50a151dd4a992eba3cf32a640639a3c86fe04869 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_manager.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_manager.cc
@@ -16,6 +16,7 @@
#include "components/policy/core/common/cloud/user_cloud_policy_store.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/core/common/policy_types.h"
+#include "components/policy/policy_constants.h"
#include "net/url_request/url_request_context_getter.h"
namespace em = enterprise_management;
@@ -96,4 +97,15 @@ bool UserCloudPolicyManager::IsClientRegistered() const {
return client() && client()->is_registered();
}
+void UserCloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) {
+ CloudPolicyManager::GetChromePolicy(policy_map);
+
+ // If the store has a verified policy blob received from the server then apply
+ // the defaults for policies that haven't been configured by the administrator
+ // given that this is an enterprise user.
+ if (!store()->has_policy())
+ return;
+ SetEnterpriseUsersDefaults(policy_map);
+}
+
} // namespace policy
« no previous file with comments | « components/policy/core/common/cloud/user_cloud_policy_manager.h ('k') | components/policy/tools/generate_policy_source.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698