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

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

Issue 193313002: Pepper: Move GetSandboxISA() to PPB_NaCl_Private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for dmichael 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_resources.cc
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
index 6ed851302487d2f959c15d1e982d2624793ec78f..e75e19d6867e9a1317e4c239041ae3296b24ea70 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
@@ -17,6 +17,14 @@
#include "third_party/jsoncpp/source/include/json/value.h"
namespace plugin {
+namespace {
+const PPB_NaCl_Private* GetNaClInterface() {
+ pp::Module *module = pp::Module::Get();
+ CHECK(module);
+ return static_cast<const PPB_NaCl_Private*>(
+ module->GetBrowserInterface(PPB_NACL_PRIVATE_INTERFACE));
+}
+} // namespace
static const char kPnaclBaseUrl[] = "chrome://pnacl-translator/";
const char PnaclUrls::kResourceInfoUrl[] = "pnacl.json";
@@ -26,7 +34,7 @@ nacl::string PnaclUrls::GetBaseUrl() {
}
nacl::string PnaclUrls::PrependPlatformPrefix(const nacl::string& url) {
- return nacl::string(GetSandboxISA()) + "/" + url;
+ return nacl::string(GetNaClInterface()->GetSandboxISA()) + "/" + url;
}
// Determine if a URL is for a pnacl-component file, or if it is some other

Powered by Google App Engine
This is Rietveld 408576698