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

Unified Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 193313002: Pepper: Move GetSandboxISA() to PPB_NaCl_Private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl_interface threading fix Created 6 years, 9 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/trusted/plugin/plugin.cc
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index 47a31f36b6e195351c5f409ea8ccbe25805139b4..8beb7ce6ae9734b7e5a66e45863fc766b836d65c 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -42,7 +42,6 @@
#include "ppapi/native_client/src/trusted/plugin/json_manifest.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#include "ppapi/native_client/src/trusted/plugin/nacl_subprocess.h"
-#include "ppapi/native_client/src/trusted/plugin/nexe_arch.h"
#include "ppapi/native_client/src/trusted/plugin/plugin_error.h"
#include "ppapi/native_client/src/trusted/plugin/service_runtime.h"
#include "ppapi/native_client/src/trusted/plugin/utility.h"
@@ -61,8 +60,8 @@ const char* const kSrcManifestAttribute = "src";
// MIME type because the "src" attribute is used to supply us with the resource
// of that MIME type that we're supposed to display.
const char* const kNaClManifestAttribute = "nacl";
-// The pseudo-ISA used to indicate portable native client.
-const char* const kPortableISA = "portable";
+// The pseudo-architecture used to indicate portable native client.
+const char* const kPortableArch = "portable";
// This is a pretty arbitrary limit on the byte size of the NaCl manfest file.
// Note that the resulting string object has to have at least one byte extra
// for the null termination character.
@@ -530,7 +529,7 @@ Plugin* Plugin::New(PP_Instance pp_instance) {
// failure. Note that module loading functions will log their own errors.
bool Plugin::Init(uint32_t argc, const char* argn[], const char* argv[]) {
PLUGIN_PRINTF(("Plugin::Init (argc=%" NACL_PRIu32 ")\n", argc));
- HistogramEnumerateOsArch(GetSandboxISA());
+ HistogramEnumerateOsArch(nacl_interface_->GetSandboxArch());
init_time_ = NaClGetTimeOfDayMicroseconds();
url_util_ = pp::URLUtil_Dev::Get();
if (url_util_ == NULL)
@@ -1154,10 +1153,11 @@ bool Plugin::SetManifestObject(const nacl::string& manifest_json,
bool nonsfi_mode_enabled =
PP_ToBool(nacl_interface_->IsNonSFIModeEnabled());
bool pnacl_debug = GetNaClInterface()->NaClDebugStubEnabled();
+ const char* sandbox_isa = nacl_interface_->GetSandboxArch();
nacl::scoped_ptr<JsonManifest> json_manifest(
new JsonManifest(url_util_,
manifest_base_url(),
- (is_pnacl ? kPortableISA : GetSandboxISA()),
+ (is_pnacl ? kPortableArch : sandbox_isa),
nonsfi_mode_enabled,
pnacl_debug));
if (!json_manifest->Init(manifest_json, error_info)) {
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/nexe_arch.h ('k') | ppapi/native_client/src/trusted/plugin/plugin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698