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

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

Issue 301743003: Pepper: PnaclResources cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_resources.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f2c5181f1dbe00ded1a2859c638233057065ecd..c7cf91b7e6f712ef9887bf13c01665ce42566268 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_resources.cc
@@ -16,19 +16,15 @@ namespace plugin {
namespace {
+static const char kPnaclBaseUrl[] = "chrome://pnacl-translator/";
+
nacl::string GetFullUrl(const nacl::string& partial_url) {
- return PnaclUrls::GetBaseUrl() + GetNaClInterface()->GetSandboxArch() + "/" +
- partial_url;
+ return nacl::string(kPnaclBaseUrl) + GetNaClInterface()->GetSandboxArch() +
+ "/" + partial_url;
}
} // namespace
-static const char kPnaclBaseUrl[] = "chrome://pnacl-translator/";
-
-nacl::string PnaclUrls::GetBaseUrl() {
- return nacl::string(kPnaclBaseUrl);
-}
-
// Determine if a URL is for a pnacl-component file, or if it is some other
// type of URL (e.g., http://, https://, chrome-extension://).
// The URL could be one of the other variants for shared libraries
@@ -55,10 +51,6 @@ nacl::string PnaclUrls::PnaclComponentURLToFilename(
return r;
}
-nacl::string PnaclUrls::GetResourceInfoUrl() {
- return "pnacl.json";
-}
-
//////////////////////////////////////////////////////////////////////
PnaclResources::~PnaclResources() {
@@ -69,18 +61,13 @@ PnaclResources::~PnaclResources() {
}
void PnaclResources::ReadResourceInfo(
- const nacl::string& resource_info_url,
const pp::CompletionCallback& resource_info_read_cb) {
- PLUGIN_PRINTF(("PnaclResources::ReadResourceInfo\n"));
-
- nacl::string full_url = PnaclUrls::GetBaseUrl() + resource_info_url;
- PLUGIN_PRINTF(("Resolved resources info url: %s\n", full_url.c_str()));
+ nacl::string full_url = "chrome://pnacl-translator/pnacl.json";
bbudge 2014/05/27 20:54:07 Could we use kPnaclBaseUrl here?
bbudge 2014/05/27 21:00:25 Or define a string constant above for the path sin
nacl::string resource_info_filename =
- PnaclUrls::PnaclComponentURLToFilename(full_url);
+ PnaclUrls::PnaclComponentURLToFilename(full_url);
PLUGIN_PRINTF(("Pnacl-converted resources info url: %s\n",
resource_info_filename.c_str()));
-
PP_Var pp_llc_tool_name_var;
PP_Var pp_ld_tool_name_var;
if (!plugin_->nacl_interface()->GetPnaclResourceInfo(
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_resources.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698