| Index: components/nacl/common/nacl_types.h
|
| diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h
|
| index 0afb822e1723af2904e80eface172cd93d42db3c..6107dcaed3450035da7f031d7612bc3721f0d398 100644
|
| --- a/components/nacl/common/nacl_types.h
|
| +++ b/components/nacl/common/nacl_types.h
|
| @@ -12,7 +12,6 @@
|
| #include "base/basictypes.h"
|
| #include "base/memory/shared_memory.h"
|
| #include "base/process/process_handle.h"
|
| -#include "base/strings/string_split.h"
|
| #include "build/build_config.h"
|
| #include "ipc/ipc_channel.h"
|
| #include "ipc/ipc_platform_file.h"
|
| @@ -59,14 +58,26 @@ enum NaClAppProcessType {
|
| kNumNaClProcessTypes
|
| };
|
|
|
| +// Represents a request to prefetch a file that's listed in the "files" section
|
| +// of a NaCl manifest file.
|
| +struct NaClResourcePrefetchRequest {
|
| + NaClResourcePrefetchRequest();
|
| + NaClResourcePrefetchRequest(const std::string& file_key,
|
| + const std::string& resource_url);
|
| + ~NaClResourcePrefetchRequest();
|
| +
|
| + std::string file_key; // a key for open_resource.
|
| + std::string resource_url;
|
| +};
|
| +
|
| // Represents a single prefetched file that's listed in the "files" section of
|
| // a NaCl manifest file.
|
| -struct NaClResourceFileInfo {
|
| - NaClResourceFileInfo();
|
| - NaClResourceFileInfo(IPC::PlatformFileForTransit file,
|
| - const base::FilePath& file_path,
|
| - const std::string& file_key);
|
| - ~NaClResourceFileInfo();
|
| +struct NaClResourcePrefetchResult {
|
| + NaClResourcePrefetchResult();
|
| + NaClResourcePrefetchResult(IPC::PlatformFileForTransit file,
|
| + const base::FilePath& file_path,
|
| + const std::string& file_key);
|
| + ~NaClResourcePrefetchResult();
|
|
|
| IPC::PlatformFileForTransit file;
|
| base::FilePath file_path_metadata; // a key for validation caching
|
| @@ -82,9 +93,15 @@ struct NaClStartParams {
|
| // Used only as a key for validation caching.
|
| base::FilePath nexe_file_path_metadata;
|
|
|
| - std::vector<NaClResourceFileInfo> prefetched_resource_files;
|
| - std::vector<FileDescriptor> handles;
|
| - FileDescriptor debug_stub_server_bound_socket;
|
| + std::vector<NaClResourcePrefetchResult> prefetched_resource_files;
|
| + IPC::PlatformFileForTransit imc_bootstrap_handle;
|
| + IPC::PlatformFileForTransit irt_handle;
|
| +#if defined(OS_MACOSX)
|
| + IPC::PlatformFileForTransit mac_shm_fd;
|
| +#endif
|
| +#if defined(OS_POSIX)
|
| + IPC::PlatformFileForTransit debug_stub_server_bound_socket;
|
| +#endif
|
|
|
| bool validation_cache_enabled;
|
| std::string validation_cache_key;
|
| @@ -112,16 +129,17 @@ struct NaClStartParams {
|
| // nacl_host_messages.h.
|
| struct NaClLaunchParams {
|
| NaClLaunchParams();
|
| - NaClLaunchParams(const std::string& manifest_url,
|
| - const IPC::PlatformFileForTransit& nexe_file,
|
| - uint64_t nexe_token_lo,
|
| - uint64_t nexe_token_hi,
|
| - // A pair of a manifest key and its resource URL.
|
| - const base::StringPairs& resource_files_to_prefetch,
|
| - int render_view_id,
|
| - uint32 permission_bits,
|
| - bool uses_nonsfi_mode,
|
| - NaClAppProcessType process_type);
|
| + NaClLaunchParams(
|
| + const std::string& manifest_url,
|
| + const IPC::PlatformFileForTransit& nexe_file,
|
| + uint64_t nexe_token_lo,
|
| + uint64_t nexe_token_hi,
|
| + const std::vector<
|
| + NaClResourcePrefetchRequest>& resource_prefetch_request_list,
|
| + int render_view_id,
|
| + uint32 permission_bits,
|
| + bool uses_nonsfi_mode,
|
| + NaClAppProcessType process_type);
|
| ~NaClLaunchParams();
|
|
|
| std::string manifest_url;
|
| @@ -131,7 +149,7 @@ struct NaClLaunchParams {
|
| IPC::PlatformFileForTransit nexe_file;
|
| uint64_t nexe_token_lo;
|
| uint64_t nexe_token_hi;
|
| - base::StringPairs resource_files_to_prefetch;
|
| + std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list;
|
|
|
| int render_view_id;
|
| uint32 permission_bits;
|
|
|