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

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 f691edf9b2f7c6068efb3f686337ada1e994b7b6..197f9bf531d537baa5966c7bed85d773aecb6db5 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -82,8 +82,10 @@ struct NaClStartParams {
base::FilePath nexe_file_path_metadata;
std::vector<NaClResourceFileInfo> prefetched_resource_files;
- std::vector<FileDescriptor> handles;
- FileDescriptor debug_stub_server_bound_socket;
+ IPC::PlatformFileForTransit imc_bootstrap_handle;
Mark Seaborn 2015/04/23 00:10:11 Splitting up 'handles' seems reasonable but the re
hidehiko 2015/04/23 11:51:29 For cleaner handle check in nacl_listener.cc. Upda
+ IPC::PlatformFileForTransit irt_handle;
+ IPC::PlatformFileForTransit mac_shm_fd;
Mark Seaborn 2015/04/23 00:10:11 If I understand this correctly, there's a subtle b
hidehiko 2015/04/23 11:51:29 Ah, right. Fixed (including existing debug_stub_se
+ IPC::PlatformFileForTransit debug_stub_server_bound_socket;
bool validation_cache_enabled;
std::string validation_cache_key;
@@ -108,6 +110,17 @@ struct NaClStartParams {
// in nacl_types.cc.
};
+// Metadata to prefetch a resource file.
Mark Seaborn 2015/04/23 00:10:10 Similarly, using a struct with names fields instea
hidehiko 2015/04/23 11:51:29 Bonus, but I was unhappy to distribute std::vector
+struct NaClResourcePrefetchInfo {
Mark Seaborn 2015/04/23 00:10:11 How about putting this next to NaClResourceFileInf
hidehiko 2015/04/23 11:51:29 Done.
+ NaClResourcePrefetchInfo();
+ NaClResourcePrefetchInfo(const std::string& manifest_key,
+ const std::string& resource_url);
+ ~NaClResourcePrefetchInfo();
+
+ std::string manifest_key;
Mark Seaborn 2015/04/23 00:10:11 In NaClResourceFileInfo, this is called "file_key"
hidehiko 2015/04/23 11:51:29 Done.
+ std::string resource_url;
+};
+
// Parameters sent to the browser process to have it launch a NaCl process.
//
// If you change this, you will also need to update the IPC serialization in
@@ -119,9 +132,7 @@ 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,
+ const std::vector<NaClResourcePrefetchInfo>& resource_prefetch_info_list,
Mark Seaborn 2015/04/23 00:10:11 Hmm, "files_to_prefetch" seems more descriptive to
hidehiko 2015/04/23 11:51:29 Renamed to resource_prefetch_request_list. Note th
Mark Seaborn 2015/04/24 00:53:24 That reason seems a bit pedantic to me. Files are
int render_view_id,
uint32 permission_bits,
bool uses_nonsfi_mode,
@@ -135,7 +146,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<NaClResourcePrefetchInfo> resource_prefetch_info_list;
int render_view_id;
uint32 permission_bits;

Powered by Google App Engine
This is Rietveld 408576698