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

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

Issue 1085583005: Refactor params of NaClProcessMsg_Start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 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),
« components/nacl/common/nacl_types.h ('K') | « components/nacl/loader/nonsfi/nonsfi_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698