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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 344693004: Add a policy to re-enable deprecated web platform features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review feedback. 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: 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 2e9ed9b77261a55a0255cf34486deceadd815fc3..5ff48bd16fa853c31edcf907c520dd223643ae1f 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -251,8 +251,8 @@
#include "chrome/browser/media/webrtc_logging_handler_host.h"
#endif
-using blink::WebWindowFeatures;
using base::FileDescriptor;
+using blink::WebWindowFeatures;
using content::AccessTokenStore;
using content::BrowserChildProcessHostIterator;
using content::BrowserThread;
@@ -666,6 +666,9 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
prefs::kEnableHyperlinkAuditing,
true,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterListPref(
+ prefs::kEnableDeprecatedWebPlatformFeatures,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
// static
@@ -1609,6 +1612,18 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->AppendSwitch(switches::kDisable3DAPIs);
}
+ const base::ListValue* switches =
+ prefs->GetList(prefs::kEnableDeprecatedWebPlatformFeatures);
+ if (switches) {
+ // Enable any deprecated features that have been re-enabled by policy.
+ for (base::ListValue::const_iterator it = switches->begin();
+ it != switches->end(); ++it) {
+ std::string switch_to_enable;
+ if ((*it)->GetAsString(&switch_to_enable))
+ command_line->AppendSwitch(switch_to_enable);
+ }
+ }
+
// Disable client-side phishing detection in the renderer if it is
// disabled in the Profile preferences or the browser process.
if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||

Powered by Google App Engine
This is Rietveld 408576698