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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 5991003: Added group policy for disabling all client-side 3D APIs in Chromium... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/renderer_host/browser_render_process_host.cc
===================================================================
--- chrome/browser/renderer_host/browser_render_process_host.cc (revision 69586)
+++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy)
@@ -591,6 +591,14 @@
if (!profile.empty())
command_line->AppendSwitchASCII(switches::kLoginProfile, profile);
#endif
+
+ PrefService* prefs = profile()->GetPrefs();
+ // Currently this pref is only registered if applied via a policy.
+ if (prefs->HasPrefPath(prefs::kDisable3DAPIs) &&
+ prefs->GetBoolean(prefs::kDisable3DAPIs)) {
+ // Turn this policy into a command line switch.
+ command_line->AppendSwitch(switches::kDisable3DAPIs);
+ }
}
void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer(
@@ -693,7 +701,8 @@
switches::kDisableFileSystem,
switches::kPpapiOutOfProcess,
switches::kEnablePrintPreview,
- switches::kEnableCrxlessWebApps
+ switches::kEnableCrxlessWebApps,
+ switches::kDisable3DAPIs
};
renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/tab_contents/render_view_host_delegate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698