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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 373003005: Pepper: Small PnaclResources cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 048130aea5346020ad58e8ac1c52ce4fe6b86efb..81ae94d3ac8ba3120f85c7d4f44bbf6fb386dbd1 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1113,9 +1113,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";
dmichael (off chromium) 2014/07/09 19:17:43 nit: use "const char* const" or (maybe better) "co
NexeLoadManager* load_manager = GetNexeLoadManager(instance);
DCHECK(load_manager);
if (!load_manager)
@@ -1123,7 +1123,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(
@@ -1139,14 +1139,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;
}
@@ -1155,7 +1155,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;
}
@@ -1163,7 +1163,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;
}
« no previous file with comments | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698