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

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

Issue 1010183002: SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 9 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
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 fb5e6dc9e356f52fef1a591e386cada970e43eaf..498a986d0777da77a935e5dbb04c568abd1089de 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -420,9 +420,16 @@ void LaunchSelLdr(PP_Instance instance,
IPC::PlatformFileForTransit nexe_for_transit =
IPC::InvalidPlatformFileForTransit();
+#if defined(OS_POSIX)
+ static const bool kPrefetchFiles = true;
+#else
+ // TODO(yusukes): Support OS_WIN.
Mark Seaborn 2015/03/20 00:40:52 What would be required to support Windows? Since
Yusuke Sato 2015/04/16 02:38:45 Probably nothing, but I haven't confirmed it yet s
Mark Seaborn 2015/05/04 17:08:39 What happens if you remove the "#if !defined(OS_WI
Yusuke Sato 2015/05/05 18:27:16 Thanks to Hidehiko's recent refactoring, it turned
+ static const bool kPrefetchFiles = false;
+#endif
+
std::vector<std::pair<
std::string /*key*/, std::string /*url*/> > resource_files_to_prefetch;
- if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) {
+ if (process_type == kNativeNaClProcessType && kPrefetchFiles) {
JsonManifest* manifest = GetJsonManifest(instance);
if (manifest)
manifest->GetPrefetchableFiles(&resource_files_to_prefetch);
« components/nacl/loader/nacl_listener.cc ('K') | « components/nacl/loader/nacl_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698