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

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.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/pnacl_coordinator.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
index 29ada4768ef36c1bf1b8179c865ff4950ddb6cd2..00322baa8d809260f4eea8fbae20057fff97ba65 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc
@@ -37,7 +37,10 @@ namespace plugin {
// that are part of Chrome.
class PnaclManifest : public Manifest {
public:
- PnaclManifest() : manifest_base_url_(PnaclUrls::GetBaseUrl()) { }
+ PnaclManifest(const nacl::string& sandbox_arch)
+ : manifest_base_url_(PnaclUrls::GetBaseUrl()),
+ sandbox_arch_(sandbox_arch) { }
+
virtual ~PnaclManifest() { }
virtual bool GetProgramURL(nacl::string* full_url,
@@ -89,7 +92,7 @@ class PnaclManifest : public Manifest {
// Resolve the full URL to the file. Provide it with a platform-specific
// prefix.
nacl::string key_basename = key.substr(kFilesPrefix.length());
- return ResolveURL(PnaclUrls::PrependPlatformPrefix(key_basename),
+ return ResolveURL(sandbox_arch_ + "/" + key_basename,
full_url, error_info);
}
@@ -97,6 +100,7 @@ class PnaclManifest : public Manifest {
NACL_DISALLOW_COPY_AND_ASSIGN(PnaclManifest);
nacl::string manifest_base_url_;
+ nacl::string sandbox_arch_;
};
//////////////////////////////////////////////////////////////////////
@@ -222,7 +226,7 @@ PnaclCoordinator::PnaclCoordinator(
plugin_(plugin),
translate_notify_callback_(translate_notify_callback),
translation_finished_reported_(false),
- manifest_(new PnaclManifest()),
+ manifest_(new PnaclManifest(plugin->nacl_interface()->GetSandboxArch())),
pexe_url_(pexe_url),
pnacl_options_(pnacl_options),
split_module_count_(1),
@@ -508,7 +512,7 @@ void PnaclCoordinator::ResourcesDidLoad(int32_t pp_error) {
parser.GetHeader("last-modified").c_str(),
parser.GetHeader("etag").c_str(),
PP_FromBool(parser.CacheControlNoStore()),
- GetSandboxISA(),
+ plugin_->nacl_interface()->GetSandboxArch(),
"", // No extra compile flags yet.
&is_cache_hit_,
temp_nexe_file_->existing_handle(),
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.gypi ('k') | ppapi/native_client/src/trusted/plugin/pnacl_resources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698