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

Unified Diff: chrome/browser/chrome_content_browser_client.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: Switch to WebPreferences, rebase. 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
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_handler_list_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 129eec39697e1f16b4ad78d800d59234ddfadc59..bf37dfad6c913abef543c496f876bdb79f16bf0a 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -243,8 +243,8 @@
#include "chrome/browser/local_discovery/storage/privet_filesystem_backend.h"
#endif
-using blink::WebWindowFeatures;
using base::FileDescriptor;
Andrew T Wilson (Slow) 2014/05/23 15:20:55 Ah, the tyranny of alphabetical order.
+using blink::WebWindowFeatures;
using content::AccessTokenStore;
using content::BrowserChildProcessHostIterator;
using content::BrowserThread;
@@ -657,6 +657,9 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
prefs::kEnableHyperlinkAuditing,
true,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterListPref(
+ prefs::kWebKitEnableDeprecatedFeatures,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
// static
@@ -2381,6 +2384,23 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
extension, view_type, web_prefs);
}
}
+
+ // Set list of deprecated features to enable.
+ web_prefs->deprecated_features_to_enable.clear();
+ web_prefs->deprecated_features_to_enable.resize(
+ webkit_glue::DEPRECATED_FEATURE_COUNT, false);
+ const base::ListValue* deprecated_features_list =
+ prefs->GetList(prefs::kWebKitEnableDeprecatedFeatures);
+ for (base::ListValue::const_iterator feature(
+ deprecated_features_list->begin());
+ feature != deprecated_features_list->end();
+ ++feature) {
+ int value = -1;
+ if ((*feature)->GetAsInteger(&value) && value >= 0 &&
+ value < webkit_glue::DEPRECATED_FEATURE_COUNT) {
+ web_prefs->deprecated_features_to_enable[value] = true;
+ }
+ }
}
void ChromeContentBrowserClient::UpdateInspectorSetting(
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_handler_list_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698