diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 23:39:22 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 23:39:22 +0000 |
commit | b32761dcb8b4118458ed3331af8ce87058c0c795 (patch) | |
tree | b3cbcdde0549f2f9032e70264adfaf47f602e15e /components/nacl | |
parent | fede7212df489fd072a868d87434d6119323b978 (diff) | |
download | chromium_src-b32761dcb8b4118458ed3331af8ce87058c0c795.zip chromium_src-b32761dcb8b4118458ed3331af8ce87058c0c795.tar.gz chromium_src-b32761dcb8b4118458ed3331af8ce87058c0c795.tar.bz2 |
Pepper: Small PnaclResources cleanup
This fixes a place where the wrong URL is used for the ld process when
performing PNaCl translation. I don't believe the effect of this is severe,
though it will cause the wrong url to be displayed when it's running.
This also removes an unnecessary string constant usage in the trusted plugin.
BUG=
Review URL: https://codereview.chromium.org/373003005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl')
-rw-r--r-- | components/nacl/renderer/ppb_nacl_private_impl.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index 3aebd4e..79cbf9c 100644 --- a/components/nacl/renderer/ppb_nacl_private_impl.cc +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc @@ -1126,9 +1126,9 @@ bool ManifestResolveKey(PP_Instance instance, } PP_Bool GetPNaClResourceInfo(PP_Instance instance, - const char* filename, PP_Var* llc_tool_name, PP_Var* ld_tool_name) { + static const char kFilename[] = "chrome://pnacl-translator/pnacl.json"; NexeLoadManager* load_manager = GetNexeLoadManager(instance); DCHECK(load_manager); if (!load_manager) @@ -1136,7 +1136,7 @@ PP_Bool GetPNaClResourceInfo(PP_Instance instance, uint64_t nonce_lo = 0; uint64_t nonce_hi = 0; - base::File file(GetReadonlyPnaclFd(filename, false /* is_executable */, + base::File file(GetReadonlyPnaclFd(kFilename, false /* is_executable */, &nonce_lo, &nonce_hi)); if (!file.IsValid()) { load_manager->ReportLoadError( @@ -1152,14 +1152,14 @@ PP_Bool GetPNaClResourceInfo(PP_Instance instance, load_manager->ReportLoadError( PP_NACL_ERROR_PNACL_RESOURCE_FETCH, std::string("GetPNaClResourceInfo, GetFileInfo failed for: ") + - filename); + kFilename); return PP_FALSE; } if (file_info.size > 1 << 20) { load_manager->ReportLoadError( PP_NACL_ERROR_PNACL_RESOURCE_FETCH, - std::string("GetPNaClResourceInfo, file too large: ") + filename); + std::string("GetPNaClResourceInfo, file too large: ") + kFilename); return PP_FALSE; } @@ -1168,7 +1168,7 @@ PP_Bool GetPNaClResourceInfo(PP_Instance instance, load_manager->ReportLoadError( PP_NACL_ERROR_PNACL_RESOURCE_FETCH, std::string("GetPNaClResourceInfo, couldn't allocate for: ") + - filename); + kFilename); return PP_FALSE; } @@ -1176,7 +1176,7 @@ PP_Bool GetPNaClResourceInfo(PP_Instance instance, if (rc < 0) { load_manager->ReportLoadError( PP_NACL_ERROR_PNACL_RESOURCE_FETCH, - std::string("GetPNaClResourceInfo, reading failed for: ") + filename); + std::string("GetPNaClResourceInfo, reading failed for: ") + kFilename); return PP_FALSE; } |