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

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: Merge to ToT 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
« 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 a500608f602883d1459990b340f517c526be759f..e0226ae0c9ca1b5eaf3f05860fde603520f56ceb 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
@@ -1611,6 +1614,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) ||
« 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