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

Unified Diff: src/trusted/validator/validation_metadata.h

Issue 12600034: Provide metadata to validator to allow faster caching. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First fixes Created 7 years, 9 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: src/trusted/validator/validation_metadata.h
diff --git a/src/trusted/validator/validation_metadata.h b/src/trusted/validator/validation_metadata.h
new file mode 100644
index 0000000000000000000000000000000000000000..44c020cc55e0163fbaee12b9c6ddb90fa1bd3a37
--- /dev/null
+++ b/src/trusted/validator/validation_metadata.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_METADATA_H__
+#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_METADATA_H__
+
+#include <stddef.h>
+#include <time.h>
+
+#include "native_client/src/include/nacl_base.h"
+
+EXTERN_C_BEGIN
+
+/*
+ * Note: this values in this enum are written to the cache, so changing them
+ * will implicitly invalidate cache entries.
+ */
+typedef enum NaClCodeIdentityType {
+ NaClCodeIdentityData = 0,
+ NaClCodeIdentityFile = 1,
+ NaClCodeIdentityMax
+} NaClCodeIdentityType;
+
+struct NaClValidationMetadata {
+ NaClCodeIdentityType identity_type;
+ int64_t code_offset;
+ const char* file_name;
+ size_t file_name_length;
+ int64_t file_size;
+ time_t mtime;
+};
+
+EXTERN_C_END
+
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_VALIDATION_METADATA_H__ */

Powered by Google App Engine
This is Rietveld 408576698