From b32761dcb8b4118458ed3331af8ce87058c0c795 Mon Sep 17 00:00:00 2001 From: "teravest@chromium.org" Date: Wed, 9 Jul 2014 23:39:22 +0000 Subject: 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 --- components/nacl/renderer/ppb_nacl_private_impl.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'components') 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; } -- cgit v1.1