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

Unified Diff: components/nacl/common/nacl_types.h

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/common/nacl_types.h
diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h
index e5b7136416162fd5f29564e1c8e3e5adc96454a3..6107dcaed3450035da7f031d7612bc3721f0d398 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -58,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
@@ -81,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;
@@ -116,9 +134,8 @@ struct NaClLaunchParams {
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 std::vector<
- std::pair<std::string, std::string> >& resource_files_to_prefetch,
+ NaClResourcePrefetchRequest>& resource_prefetch_request_list,
int render_view_id,
uint32 permission_bits,
bool uses_nonsfi_mode,
@@ -132,7 +149,7 @@ struct NaClLaunchParams {
IPC::PlatformFileForTransit nexe_file;
uint64_t nexe_token_lo;
uint64_t nexe_token_hi;
- std::vector<std::pair<std::string, std::string> > resource_files_to_prefetch;
+ std::vector<NaClResourcePrefetchRequest> resource_prefetch_request_list;
int render_view_id;
uint32 permission_bits;

Powered by Google App Engine
This is Rietveld 408576698