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

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: 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
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 10c86804ebb0a9b82d170523f813663b1c6a7c08..a0a7bc13520e199b2437f70d5942f9d462b7e273 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;
+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;
jamesr 2014/06/10 18:11:27 I understand you're in a hurry to land but this is
Andrew T Wilson (Slow) 2014/06/10 18:53:33 The goal is that many future deprecated APIs would
+ }
+ }
}
void ChromeContentBrowserClient::UpdateInspectorSetting(
« no previous file with comments | « no previous file | chrome/browser/policy/configuration_policy_handler_list_factory.cc » ('j') | webkit/common/webpreferences.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698