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

Unified Diff: components/policy/core/common/schema_map.cc

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios tests Created 6 years, 6 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/schema_map.cc
diff --git a/components/policy/core/common/schema_map.cc b/components/policy/core/common/schema_map.cc
index 90c30ee51cd4e66011fbafe961698c115ce44d8e..19898c7091449db253b1a1f01c1eba015f23fcb9 100644
--- a/components/policy/core/common/schema_map.cc
+++ b/components/policy/core/common/schema_map.cc
@@ -54,8 +54,18 @@ void SchemaMap::FilterBundle(PolicyBundle* bundle) const {
// then its policies aren't filtered. This behavior is enabled to allow a
// graceful update of the Legacy Browser Support extension; it'll be removed
// in a future release. http://crbug.com/240704
- if (!schema->valid())
+ static const char kLegacyBrowserSupportExtensionId[] =
+ "heildphpnddilhkemkielfhnkaagiabh";
+ if (it->first.domain == POLICY_DOMAIN_EXTENSIONS &&
+ it->first.component_id == kLegacyBrowserSupportExtensionId) {
continue;
+ }
+
+ if (!schema->valid()) {
+ // Don't serve unknown policies.
+ it->second->Clear();
+ continue;
+ }
PolicyMap* map = it->second;
for (PolicyMap::const_iterator it_map = map->begin();

Powered by Google App Engine
This is Rietveld 408576698