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

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: rebase 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
« no previous file with comments | « components/nacl/common/nacl_messages.h ('k') | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f691edf9b2f7c6068efb3f686337ada1e994b7b6 100644
--- a/components/nacl/common/nacl_types.h
+++ b/components/nacl/common/nacl_types.h
@@ -6,6 +6,7 @@
#define COMPONENTS_NACL_COMMON_NACL_TYPES_H_
#include <string>
+#include <utility>
#include <vector>
#include "base/basictypes.h"
@@ -57,6 +58,20 @@ enum NaClAppProcessType {
kNumNaClProcessTypes
};
+// 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();
+
+ IPC::PlatformFileForTransit file;
+ base::FilePath file_path_metadata; // a key for validation caching
+ std::string file_key; // a key for open_resource
+};
+
// Parameters sent to the NaCl process when we start it.
struct NaClStartParams {
NaClStartParams();
@@ -66,6 +81,7 @@ 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;
@@ -98,14 +114,18 @@ 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,
- 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,
+ // A pair of a manifest key and its resource URL.
+ const std::vector<
+ std::pair<std::string, std::string> >& resource_files_to_prefetch,
+ int render_view_id,
+ uint32 permission_bits,
+ bool uses_nonsfi_mode,
+ NaClAppProcessType process_type);
~NaClLaunchParams();
std::string manifest_url;
@@ -115,6 +135,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;
int render_view_id;
uint32 permission_bits;
« no previous file with comments | « components/nacl/common/nacl_messages.h ('k') | components/nacl/common/nacl_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698