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

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

Issue 649603004: Non-SFI NaCl: Batch-open resource files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years, 10 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 11aaeb9b4139156cc9f964994a9a4afcacfcd8e8..c61b7ae59335b30bc29138e6c6cbca8417a9404d 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -57,15 +57,42 @@ enum NaClAppProcessType {
kNumNaClProcessTypes
};
+struct NaClFileInfo {
Mark Seaborn 2015/02/09 04:48:34 This is basically the same type as PP_NaClFileInfo
Yusuke Sato 2015/02/11 05:54:20 (This struct no longer exists)
+ NaClFileInfo();
+ NaClFileInfo(IPC::PlatformFileForTransit file,
+ uint64_t file_token_lo,
+ uint64_t file_token_hi);
+ ~NaClFileInfo();
+
+ IPC::PlatformFileForTransit file;
+ uint64_t file_token_lo;
+ uint64_t file_token_hi;
+};
+
// Parameters sent to the NaCl process when we start it.
struct NaClStartParams {
+ struct ResourceFileInfo {
Yusuke Sato 2015/02/11 05:54:21 Let me keep this one. Unlike renderer-browser IPC,
+ ResourceFileInfo();
+ ResourceFileInfo(IPC::PlatformFileForTransit file,
+ const base::FilePath& file_path,
+ const std::string& file_key);
+ ~ResourceFileInfo();
+
+ IPC::PlatformFileForTransit file;
+ base::FilePath file_path;
+ std::string file_key;
+ };
+
NaClStartParams();
~NaClStartParams();
+ void CheckNumOfDescriptors();
+
IPC::PlatformFileForTransit nexe_file;
// Used only as a key for validation caching.
base::FilePath nexe_file_path_metadata;
+ std::vector<ResourceFileInfo> resource_files;
std::vector<FileDescriptor> handles;
FileDescriptor debug_stub_server_bound_socket;
@@ -89,7 +116,8 @@ struct NaClStartParams {
// NOTE: Any new fields added here must also be added to the IPC
// serialization in nacl_messages.h and (for POD fields) the constructor
- // in nacl_types.cc.
+ // in nacl_types.cc. Any new fields added for passing file handles must
+ // also be checked in NaClStartParams::CheckNumOfDescriptors().
};
// Parameters sent to the browser process to have it launch a NaCl process.
@@ -97,15 +125,28 @@ struct NaClStartParams {
// If you change this, you will also need to update the IPC serialization in
// nacl_host_messages.h.
struct NaClLaunchParams {
+ struct ResourceFileInfo {
Yusuke Sato 2015/02/11 05:54:21 removed
+ ResourceFileInfo();
+ ResourceFileInfo(NaClFileInfo file_info,
+ const std::string& file_key);
+ ~ResourceFileInfo();
+
+ NaClFileInfo file_info;
+ // This corresponds to a key in the "files" section of the NMF file.
+ std::string file_key;
+ };
+
NaClLaunchParams();
- NaClLaunchParams(const std::string& manifest_url,
- const IPC::PlatformFileForTransit& nexe_file,
- uint64_t nexe_token_lo,
- uint64_t nexe_token_hi,
- 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<ResourceFileInfo>& resource_files,
+ int render_view_id,
+ uint32 permission_bits,
+ bool uses_nonsfi_mode,
+ NaClAppProcessType process_type);
~NaClLaunchParams();
std::string manifest_url;
@@ -115,6 +156,7 @@ struct NaClLaunchParams {
IPC::PlatformFileForTransit nexe_file;
uint64_t nexe_token_lo;
uint64_t nexe_token_hi;
+ std::vector<ResourceFileInfo> resource_files_info;
int render_view_id;
uint32 permission_bits;

Powered by Google App Engine
This is Rietveld 408576698