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

Side by Side Diff: src/trusted/reverse_service/reverse_service.h

Issue 15039022: Enable meta-based validation for shared libraries. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Style Created 7 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 /* -*- c++ -*- */ 1 /* -*- c++ -*- */
2 /* 2 /*
3 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 3 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SERVICE_H_ 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SERVICE_H_
9 #define NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SERVICE_H_ 9 #define NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_REVERSE_SERVICE_H_
10 10
11 #include <set> 11 #include <set>
12 12
13 #include "native_client/src/include/nacl_compiler_annotations.h" 13 #include "native_client/src/include/nacl_compiler_annotations.h"
14 #include "native_client/src/include/nacl_macros.h" 14 #include "native_client/src/include/nacl_macros.h"
15 #include "native_client/src/include/nacl_scoped_ptr.h" 15 #include "native_client/src/include/nacl_scoped_ptr.h"
16 #include "native_client/src/include/nacl_string.h" 16 #include "native_client/src/include/nacl_string.h"
17 17
18 #include "native_client/src/shared/platform/refcount_base.h" 18 #include "native_client/src/shared/platform/refcount_base.h"
19 #include "native_client/src/shared/platform/nacl_sync.h" 19 #include "native_client/src/shared/platform/nacl_sync.h"
20 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 20 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
21 #include "native_client/src/trusted/reverse_service/reverse_service_c.h" 21 #include "native_client/src/trusted/reverse_service/reverse_service_c.h"
22 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" 22 #include "native_client/src/trusted/service_runtime/include/sys/errno.h"
23 #include "native_client/src/trusted/service_runtime/include/sys/nacl_name_servic e.h" 23 #include "native_client/src/trusted/service_runtime/include/sys/nacl_name_servic e.h"
24 24
25 struct NaClFileInfo;
26
25 namespace nacl { 27 namespace nacl {
26 28
27 // The CreateProcessFunctorInterface allows delivery of results to an 29 // The CreateProcessFunctorInterface allows delivery of results to an
28 // RPC handler via the Results arguments. This is so that RPC 30 // RPC handler via the Results arguments. This is so that RPC
29 // handlers can invoke their done closure to send the output arguments 31 // handlers can invoke their done closure to send the output arguments
30 // -- when the functor returns, the code that invoked the 32 // -- when the functor returns, the code that invoked the
31 // CreateProcessFunctorInterface can unlock mutex locks, deallocate 33 // CreateProcessFunctorInterface can unlock mutex locks, deallocate
32 // memory, or finalize storage as needed. (See the 2-phase comment in 34 // memory, or finalize storage as needed. (See the 2-phase comment in
33 // src/trusted/sel_universal/reverse_emulate.cc, 35 // src/trusted/sel_universal/reverse_emulate.cc,
34 // ReverseEmulate::CreateProcessFunctorResult.) 36 // ReverseEmulate::CreateProcessFunctorResult.)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 71
70 // The bool functions returns false if the service thread unblocked 72 // The bool functions returns false if the service thread unblocked
71 // because of surf-away, shutdown, or other issues. The plugin, 73 // because of surf-away, shutdown, or other issues. The plugin,
72 // when it tells sel_ldr to shut down, will also signal all threads 74 // when it tells sel_ldr to shut down, will also signal all threads
73 // that are waiting for main thread callbacks to wake up and abandon 75 // that are waiting for main thread callbacks to wake up and abandon
74 // their vigil after the callbacks are all cancelled (by abandoning 76 // their vigil after the callbacks are all cancelled (by abandoning
75 // the WeakRefAnchor or by bombing their CompletionCallbackFactory). 77 // the WeakRefAnchor or by bombing their CompletionCallbackFactory).
76 // Since shutdown/surfaway is the only admissible error, we use bool 78 // Since shutdown/surfaway is the only admissible error, we use bool
77 // as the return type. 79 // as the return type.
78 virtual bool EnumerateManifestKeys(std::set<nacl::string>* keys) = 0; 80 virtual bool EnumerateManifestKeys(std::set<nacl::string>* keys) = 0;
79 virtual bool OpenManifestEntry(nacl::string url_key, int32_t* out_desc) = 0; 81
82 // An adapter to prevent this interface change from breaking the DEPS roll.
83 // TODO(ncbray) remove
84 virtual bool OpenManifestEntry(nacl::string url_key, int32_t* out_desc);
85 // TODO(ncbray) convert to a pure virtual.
86 virtual bool OpenManifestEntry(nacl::string url_key,
87 struct NaClFileInfo* info);
80 virtual bool CloseManifestEntry(int32_t desc) = 0; 88 virtual bool CloseManifestEntry(int32_t desc) = 0;
81 virtual void ReportCrash() = 0; 89 virtual void ReportCrash() = 0;
82 90
83 // The low-order 8 bits of the |exit_status| should be reported to 91 // The low-order 8 bits of the |exit_status| should be reported to
84 // any interested parties. 92 // any interested parties.
85 virtual void ReportExitStatus(int exit_status) = 0; 93 virtual void ReportExitStatus(int exit_status) = 0;
86 94
87 // Standard output and standard error redirection, via setting 95 // Standard output and standard error redirection, via setting
88 // NACL_EXE_STDOUT to the string "DEBUG_ONLY:dev://postmessage" (see 96 // NACL_EXE_STDOUT to the string "DEBUG_ONLY:dev://postmessage" (see
89 // native_client/src/trusted/nacl_resource.* and sel_ldr). NB: the 97 // native_client/src/trusted/nacl_resource.* and sel_ldr). NB: the
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 private: 184 private:
177 NACL_DISALLOW_COPY_AND_ASSIGN(ReverseService); 185 NACL_DISALLOW_COPY_AND_ASSIGN(ReverseService);
178 186
179 NaClReverseService* service_; 187 NaClReverseService* service_;
180 ReverseInterface* reverse_interface_; 188 ReverseInterface* reverse_interface_;
181 }; 189 };
182 190
183 } // namespace nacl 191 } // namespace nacl
184 192
185 #endif 193 #endif
OLDNEW
« no previous file with comments | « src/trusted/reverse_service/nacl_file_info.h ('k') | src/trusted/reverse_service/reverse_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698