Skip to content

Commit

Permalink
Remove IsPnaclEnabled from ppb_nacl_private.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvoung@chromium.org committed Oct 25, 2013
1 parent 23aff81 commit e085931
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 22 deletions.
6 changes: 0 additions & 6 deletions chrome/renderer/pepper/ppb_nacl_private_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -366,7 +361,6 @@ const PPB_NaCl_Private nacl_interface = {
&GetNexeFd,
&ReportTranslationFinished,
&IsOffTheRecord,
&IsPnaclEnabled,
&ReportNaClError,
&OpenNaClExecutable
};
Expand Down
4 changes: 0 additions & 4 deletions ppapi/api/private/ppb_nacl_private.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions ppapi/c/private/ppb_nacl_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion ppapi/native_client/src/trusted/plugin/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion ppapi/native_client/src/trusted/plugin/service_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down
6 changes: 0 additions & 6 deletions ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
};
Expand Down

0 comments on commit e085931

Please sign in to comment.