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

Unified Diff: chrome/browser/policy/configuration_policy_handler_list_factory.cc

Issue 263423003: Add a policy to re-enable deprecated web platform features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/browser/policy/configuration_policy_handler_list_factory.cc
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index d8e3239a54e12e733c1a9bb070d8f917febf6a88..a9536abd463c2692eff4b1b07bfe437f781f3ceb 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/policy/javascript_policy_handler.h"
#include "chrome/browser/sessions/restore_on_startup_policy_handler.h"
#include "chrome/browser/sync/sync_policy_handler.h"
+#include "content/public/common/renderer_preferences.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/manifest.h"
#endif
@@ -491,6 +492,13 @@ StringToIntEnumListPolicyHandler::MappingEntry kExtensionAllowedTypesMap[] = {
{ "legacy_packaged_app", extensions::Manifest::TYPE_LEGACY_PACKAGED_APP },
{ "platform_app", extensions::Manifest::TYPE_PLATFORM_APP },
};
+
+// Maps feature tags as specified in policy to the corresponding enum value.
+StringToIntEnumListPolicyHandler::MappingEntry
Andrew T Wilson (Slow) 2014/05/08 11:32:45 BTW, should add a TODO + a crbug entry to remove t
Mattias Nissler (ping if slow) 2014/05/09 16:38:27 Adam, would you like to track this as part of http
+ kEnableDeprecatedWebPlatformFeaturesMap[] = {
+ {"ShowModalDialog",
Mattias Nissler (ping if slow) 2014/05/06 14:31:15 We should talk some more about the naming - do we
Andrew T Wilson (Slow) 2014/05/08 11:32:45 If people are going to stay on old versions to kee
Mattias Nissler (ping if slow) 2014/05/09 16:38:27 That's certainly a risk, but they'd have to retain
+ content::RENDERER_PREFERENCES_DEPRECATED_FEATURE_SHOW_MODAL_DIALOG},
+};
#endif // !defined(OS_IOS)
} // namespace
@@ -561,6 +569,13 @@ scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
extensions::pref_names::kAllowedTypes,
kExtensionAllowedTypesMap,
kExtensionAllowedTypesMap + arraysize(kExtensionAllowedTypesMap))));
+ handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
+ new StringToIntEnumListPolicyHandler(
+ key::kEnableDeprecatedWebPlatformFeatures,
+ prefs::kEnableDeprecatedWebPlatformFeatures,
+ kEnableDeprecatedWebPlatformFeaturesMap,
+ kEnableDeprecatedWebPlatformFeaturesMap +
+ arraysize(kEnableDeprecatedWebPlatformFeaturesMap))));
#endif // !defined(OS_IOS)
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | chrome/browser/renderer_preferences_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698