Commit 3faf5be0 authored by mseaborn's avatar mseaborn Committed by Commit bot

NaCl cleanup: Remove references to native_client/src/public/nacl_file_info.h

It's no longer necessary for the NaCl side to define and refer to the
NaClFileToken struct.

So we can change the Chromium side to define NaClFileToken, instead of
using the definition from nacl_file_info.h.  This will let us remove
nacl_file_info.h from the NaCl side.

We copy the comment from nacl_file_info.h.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=4073
TEST=build

Review URL: https://codereview.chromium.org/903333002

Cr-Commit-Position: refs/heads/master@{#315317}
parent bcfc1b3c
......@@ -15,7 +15,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "ipc/ipc_platform_file.h"
#include "native_client/src/public/nacl_file_info.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
......
......@@ -46,7 +46,6 @@
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_switches.h"
#include "native_client/src/public/nacl_file_info.h"
#include "native_client/src/shared/imc/nacl_imc_c.h"
#include "net/base/net_util.h"
#include "net/socket/tcp_listen_socket.h"
......
......@@ -19,7 +19,6 @@
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "ipc/ipc_channel_handle.h"
#include "native_client/src/public/nacl_file_info.h"
#include "net/socket/socket_descriptor.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "url/gurl.h"
......@@ -35,6 +34,17 @@ class ChannelProxy;
namespace nacl {
// NaClFileToken is a single-use nonce that the NaCl loader process can use
// to query the browser process for trusted information about a file. This
// helps establish that the file is known by the browser to be immutable
// and suitable for file-identity-based validation caching. lo == 0 && hi
// == 0 indicates the token is invalid and no additional information is
// available.
struct NaClFileToken {
uint64_t lo;
uint64_t hi;
};
class NaClHostMessageFilter;
void* AllocateAddressSpaceASLR(base::ProcessHandle process, size_t size);
......
......@@ -32,7 +32,6 @@
#include "native_client/src/public/chrome_main.h"
#include "native_client/src/public/nacl_app.h"
#include "native_client/src/public/nacl_desc.h"
#include "native_client/src/public/nacl_file_info.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "third_party/mojo/src/mojo/edk/embedder/platform_support.h"
#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
......
......@@ -9,8 +9,6 @@
#include "base/basictypes.h"
struct NaClFileToken;
class NaClValidationDB {
public:
NaClValidationDB() {}
......
......@@ -8,7 +8,6 @@
#include "components/nacl/loader/nacl_validation_db.h"
#include "crypto/nss_util.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/public/nacl_file_info.h"
#include "native_client/src/trusted/validator/validation_cache.h"
NaClValidationQueryContext::NaClValidationQueryContext(
......
......@@ -24,7 +24,6 @@
#include "native_client/src/include/portability_io.h"
#include "native_client/src/include/portability_string.h"
#include "native_client/src/public/imc_types.h"
#include "native_client/src/public/nacl_file_info.h"
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/src/shared/platform/nacl_log.h"
#include "native_client/src/shared/platform/nacl_sync.h"
......
......@@ -19,8 +19,6 @@
#include "native_client/src/shared/srpc/nacl_srpc.h"
#include "ppapi/cpp/completion_callback.h"
struct NaClFileInfo;
namespace plugin {
class ErrorInfo;
......
......@@ -154,12 +154,10 @@ struct PP_PNaClOptions {
typedef void PP_OpenResourceCompletionCallback([inout] mem_t user_data,
[in] PP_FileHandle file_handle);
/* Corresponds to NaClFileInfo in
* native_client/src/trusted/validator/nacl_file_info.h */
struct PP_NaClFileInfo {
PP_FileHandle handle;
/* See NaClFileToken comment in nacl_file_info.h */
/* See NaClFileToken comment in nacl_process_host.h */
uint64_t token_lo;
uint64_t token_hi;
};
......
......@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
/* From private/ppb_nacl_private.idl modified Fri Jan 23 09:09:44 2015. */
/* From private/ppb_nacl_private.idl modified Sun Feb 8 11:33:30 2015. */
#ifndef PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
......@@ -191,11 +191,9 @@ typedef void (*PP_OpenResourceCompletionCallback)(void* user_data,
* @addtogroup Structs
* @{
*/
/* Corresponds to NaClFileInfo in
* native_client/src/trusted/validator/nacl_file_info.h */
struct PP_NaClFileInfo {
PP_FileHandle handle;
/* See NaClFileToken comment in nacl_file_info.h */
/* See NaClFileToken comment in nacl_process_host.h */
uint64_t token_lo;
uint64_t token_hi;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment