Chromium Code Reviews| 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( |