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 c879e48671bf9e1cb00fc42c3325ba6d162bf16f..a8d64df45fa84dbb419cf4a4b4c08630d9d45078 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -421,18 +421,22 @@ void LaunchSelLdr(PP_Instance instance, |
IPC::PlatformFileForTransit nexe_for_transit = |
IPC::InvalidPlatformFileForTransit(); |
- std::vector<std::pair< |
- std::string /*key*/, std::string /*url*/> > resource_files_to_prefetch; |
+ std::vector<NaClResourcePrefetchInfo> resource_prefetch_info_list; |
if (process_type == kNativeNaClProcessType && uses_nonsfi_mode) { |
JsonManifest* manifest = GetJsonManifest(instance); |
- if (manifest) |
- manifest->GetPrefetchableFiles(&resource_files_to_prefetch); |
- for (size_t i = 0; i < resource_files_to_prefetch.size(); ++i) { |
- const GURL gurl(resource_files_to_prefetch[i].second); |
- // Important security check. Do not remove. |
- if (!CanOpenViaFastPath(plugin_instance, gurl)) { |
- resource_files_to_prefetch.clear(); |
- break; |
+ if (manifest) { |
+ std::vector< |
+ std::pair<std::string /*key*/, std::string /*url*/> > candidates; |
+ manifest->GetPrefetchableFiles(&candidates); |
Mark Seaborn
2015/04/23 00:10:11
Would it make sense for GetPrefetchableFiles to us
hidehiko
2015/04/23 11:51:29
Done.
|
+ for (size_t i = 0; i < candidates.size(); ++i) { |
+ const GURL gurl(candidates[i].second); |
+ // Important security check. Do not remove. |
+ if (!CanOpenViaFastPath(plugin_instance, gurl)) { |
+ resource_prefetch_info_list.clear(); |
+ break; |
+ } |
+ resource_prefetch_info_list.push_back(NaClResourcePrefetchInfo( |
+ candidates[i].first, candidates[i].second)); |
} |
} |
} |
@@ -454,7 +458,7 @@ void LaunchSelLdr(PP_Instance instance, |
nexe_for_transit, |
nexe_file_info->token_lo, |
nexe_file_info->token_hi, |
- resource_files_to_prefetch, |
+ resource_prefetch_info_list, |
routing_id, |
perm_bits, |
PP_ToBool(uses_nonsfi_mode), |