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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc

Issue 8301006: Packaged (CRX) extensions shouldn't be able to get 'dev' interfaces in NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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: ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc (revision 105583)
+++ ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc (working copy)
@@ -56,26 +56,6 @@
} // namespace
-// By default, disable developer (Dev) interfaces. To enable developer
-// interfaces, set the environment variable NACL_ENABLE_PPAPI_DEV to 1.
-// Also, the plugin can request whether or not to enable dev interfaces.
-bool AreDevInterfacesEnabled() {
- static bool first = true;
- static bool env_dev_enabled = false;
- if (first) {
- const char *nacl_enable_ppapi_dev = getenv("NACL_ENABLE_PPAPI_DEV");
- if (NULL != nacl_enable_ppapi_dev) {
- int v = strtol(nacl_enable_ppapi_dev, (char **) 0, 0);
- if (v != 0) {
- env_dev_enabled = true;
- }
- }
- first = false;
- }
- return env_dev_enabled || enable_dev_interfaces;
-}
-
-
void SetBrowserPppForInstance(PP_Instance instance, BrowserPpp* browser_ppp) {
// If there was no map, create one.
if (instance_to_ppp_map == NULL) {
@@ -202,7 +182,7 @@
return NULL;
}
// If dev interface is not enabled, reject interfaces containing "(Dev)"
- if (!AreDevInterfacesEnabled() && strstr(interface_name, "(Dev)") != NULL) {
+ if (!enable_dev_interfaces && strstr(interface_name, "(Dev)") != NULL) {
return NULL;
}
if (!enable_3d_interfaces) {

Powered by Google App Engine
This is Rietveld 408576698