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

Side by Side Diff: src/trusted/desc_cacheability/desc_cacheability.c

Issue 261683002: Make a NaClDesc ctor for creating descs from NaClFileInfo. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: use or Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/trusted/desc_cacheability/desc_cacheability.h" 7 #include "native_client/src/trusted/desc_cacheability/desc_cacheability.h"
8 8
9 #include "native_client/src/include/portability.h" 9 #include "native_client/src/include/portability.h"
10 #include "native_client/src/public/desc_metadata_types.h" 10 #include "native_client/src/public/desc_metadata_types.h"
11 #include "native_client/src/public/nacl_file_info.h"
11 #include "native_client/src/shared/platform/nacl_log.h" 12 #include "native_client/src/shared/platform/nacl_log.h"
12 #include "native_client/src/trusted/desc/nacl_desc_base.h" 13 #include "native_client/src/trusted/desc/nacl_desc_base.h"
13 #include "native_client/src/trusted/desc/nacl_desc_io.h" 14 #include "native_client/src/trusted/desc/nacl_desc_io.h"
14 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h" 15 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h"
15 #include "native_client/src/trusted/validator/nacl_file_info.h"
16 #include "native_client/src/trusted/validator/rich_file_info.h" 16 #include "native_client/src/trusted/validator/rich_file_info.h"
17 #include "native_client/src/trusted/validator/validation_cache.h" 17 #include "native_client/src/trusted/validator/validation_cache.h"
18 18
19 int NaClDescSetFileToken(struct NaClDesc *desc, 19 int NaClDescSetFileToken(struct NaClDesc *desc,
20 struct NaClFileToken const *token) { 20 struct NaClFileToken const *token) {
21 int error; 21 int error;
22 error = (*NACL_VTBL(NaClDesc, desc)-> 22 error = (*NACL_VTBL(NaClDesc, desc)->
23 SetMetadata)(desc, 23 SetMetadata)(desc,
24 NACL_DESC_METADATA_FILE_TOKEN_TYPE, 24 NACL_DESC_METADATA_FILE_TOKEN_TYPE,
25 sizeof *token, (uint8_t const *) token); 25 sizeof *token, (uint8_t const *) token);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 " file token\n"); 110 " file token\n");
111 } else { 111 } else {
112 replacement = NaClExchangeFileTokenForMappableDesc(&file_token, 112 replacement = NaClExchangeFileTokenForMappableDesc(&file_token,
113 validation_cache); 113 validation_cache);
114 if (NULL != replacement) { 114 if (NULL != replacement) {
115 NaClDescUnref(desc); 115 NaClDescUnref(desc);
116 *desc_in_out = replacement; 116 *desc_in_out = replacement;
117 } 117 }
118 } 118 }
119 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698