diff options
author | jvoung@chromium.org <jvoung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 03:49:57 +0000 |
---|---|---|
committer | jvoung@chromium.org <jvoung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 03:49:57 +0000 |
commit | e08593174e87bcb322f50c2bdc5349bc0d5ba9e0 (patch) | |
tree | f4b772ab487729d821968f43a5859b28b6c68d16 | |
parent | 23aff81843deaeaf36747a3718edf3de9bea0075 (diff) | |
download | chromium_src-e08593174e87bcb322f50c2bdc5349bc0d5ba9e0.zip chromium_src-e08593174e87bcb322f50c2bdc5349bc0d5ba9e0.tar.gz chromium_src-e08593174e87bcb322f50c2bdc5349bc0d5ba9e0.tar.bz2 |
Remove IsPnaclEnabled from ppb_nacl_private.
There is now an earlier choke point which blocks the plugin
from loading, if anyone needs to turn off PNaCl. No need to
check in the plugin too (it's just a CHECK() now anyway).
BUG=cleanup
Review URL: https://codereview.chromium.org/41913003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230934 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 1 insertions, 22 deletions
diff --git a/chrome/renderer/pepper/ppb_nacl_private_impl.cc b/chrome/renderer/pepper/ppb_nacl_private_impl.cc index 967ea6d..6717bba 100644 --- a/chrome/renderer/pepper/ppb_nacl_private_impl.cc +++ b/chrome/renderer/pepper/ppb_nacl_private_impl.cc @@ -306,11 +306,6 @@ PP_Bool IsOffTheRecord() { return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); } -PP_Bool IsPnaclEnabled() { - return PP_FromBool( - !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl)); -} - PP_ExternalPluginResult ReportNaClError(PP_Instance instance, PP_NaClError error_id) { IPC::Sender* sender = content::RenderThread::Get(); @@ -366,7 +361,6 @@ const PPB_NaCl_Private nacl_interface = { &GetNexeFd, &ReportTranslationFinished, &IsOffTheRecord, - &IsPnaclEnabled, &ReportNaClError, &OpenNaClExecutable }; diff --git a/ppapi/api/private/ppb_nacl_private.idl b/ppapi/api/private/ppb_nacl_private.idl index 4bb602f..3b965e9 100644 --- a/ppapi/api/private/ppb_nacl_private.idl +++ b/ppapi/api/private/ppb_nacl_private.idl @@ -147,10 +147,6 @@ interface PPB_NaCl_Private { */ PP_Bool IsOffTheRecord(); - /* Return true if PNaCl is turned on. - */ - PP_Bool IsPnaclEnabled(); - /* Display a UI message to the user. */ PP_ExternalPluginResult ReportNaClError([in] PP_Instance instance, [in] PP_NaClError message_id); diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h index 6441efd..923e9cb 100644 --- a/ppapi/c/private/ppb_nacl_private.h +++ b/ppapi/c/private/ppb_nacl_private.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From private/ppb_nacl_private.idl modified Thu Aug 29 17:42:12 2013. */ +/* From private/ppb_nacl_private.idl modified Fri Oct 18 08:23:34 2013. */ #ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ #define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_ @@ -159,9 +159,6 @@ struct PPB_NaCl_Private_1_0 { /* Return true if we are off the record. */ PP_Bool (*IsOffTheRecord)(void); - /* Return true if PNaCl is turned on. - */ - PP_Bool (*IsPnaclEnabled)(void); /* Display a UI message to the user. */ PP_ExternalPluginResult (*ReportNaClError)(PP_Instance instance, PP_NaClError message_id); diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index 25c348b..5a783af 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -1182,7 +1182,6 @@ void Plugin::ProcessNaClManifest(const nacl::string& manifest_json) { // Inform JavaScript that we found a nexe URL to load. EnqueueProgressEvent(kProgressEventProgress); if (pnacl_options.translate()) { - CHECK(nacl_interface()->IsPnaclEnabled()); pp::CompletionCallback translate_callback = callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate); // Will always call the callback on success or failure. diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index 2795786..8f59f3a 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -337,7 +337,6 @@ void PluginReverseInterface::OpenManifestEntry_MainThreadContinuation( NaClLog(4, "OpenManifestEntry_MainThreadContinuation: " "pulling down and translating.\n"); - CHECK(plugin_->nacl_interface()->IsPnaclEnabled()); pp::CompletionCallback translate_callback = WeakRefNewCallback( anchor_, diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 0906517..d8ca859 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -3093,11 +3093,6 @@ static PP_Bool Pnacl_M25_PPB_NaCl_Private_IsOffTheRecord(void) { return iface->IsOffTheRecord(); } -static PP_Bool Pnacl_M25_PPB_NaCl_Private_IsPnaclEnabled(void) { - const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface; - return iface->IsPnaclEnabled(); -} - static PP_ExternalPluginResult Pnacl_M25_PPB_NaCl_Private_ReportNaClError(PP_Instance instance, PP_NaClError message_id) { const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface; return iface->ReportNaClError(instance, message_id); @@ -4955,7 +4950,6 @@ struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = { .GetNexeFd = (int32_t (*)(PP_Instance instance, const char* pexe_url, uint32_t abi_version, uint32_t opt_level, const char* last_modified, const char* etag, PP_Bool has_no_store_header, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback callback))&Pnacl_M25_PPB_NaCl_Private_GetNexeFd, .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished, .IsOffTheRecord = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsOffTheRecord, - .IsPnaclEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsPnaclEnabled, .ReportNaClError = (PP_ExternalPluginResult (*)(PP_Instance instance, PP_NaClError message_id))&Pnacl_M25_PPB_NaCl_Private_ReportNaClError, .OpenNaClExecutable = (PP_FileHandle (*)(PP_Instance instance, const char* file_url, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable }; |