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

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: Rebase 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 ccc96bb18e1ddc4045d64ce3952ed7d3684997d3..3a3495aef71eba114ccd559532b6799e9eb81dcd 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -421,17 +421,19 @@ void LaunchSelLdr(PP_Instance instance,
IPC::PlatformFileForTransit nexe_for_transit =
IPC::InvalidPlatformFileForTransit();
- base::StringPairs resource_files_to_prefetch;
+ std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_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) {
+ manifest->GetPrefetchableFiles(&resource_prefetch_request_list);
+
+ for (size_t i = 0; i < resource_prefetch_request_list.size(); ++i) {
+ const GURL gurl(resource_prefetch_request_list[i].resource_url);
+ // Important security check. Do not remove.
+ if (!CanOpenViaFastPath(plugin_instance, gurl)) {
+ resource_prefetch_request_list.clear();
+ break;
+ }
}
}
}
@@ -453,7 +455,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_request_list,
routing_id,
perm_bits,
PP_ToBool(uses_nonsfi_mode),

Powered by Google App Engine
This is Rietveld 408576698