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

Side by Side Diff: src/trusted/nonnacl_util/sel_ldr_launcher.h

Issue 10914138: Split secure command channel and untrusted application channel (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fixed a few nits. Created 8 years, 2 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 8
9 // Utility class for launching sel_ldr. 9 // Utility class for launching sel_ldr.
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Sets up the SRPC channel |out_app_chan|. 103 // Sets up the SRPC channel |out_app_chan|.
104 bool SetupAppChannel(NaClSrpcChannel* out_app_chan); 104 bool SetupAppChannel(NaClSrpcChannel* out_app_chan);
105 105
106 // Sends the SRPC to start the nexe over |command| and sets up the application 106 // Sends the SRPC to start the nexe over |command| and sets up the application
107 // SRPC chanel |out_app_chan|. 107 // SRPC chanel |out_app_chan|.
108 bool StartModuleAndSetupAppChannel(NaClSrpcChannel* command, 108 bool StartModuleAndSetupAppChannel(NaClSrpcChannel* command,
109 NaClSrpcChannel* out_app_chan); 109 NaClSrpcChannel* out_app_chan);
110 110
111 // Returns the socket address used to connect to the sel_ldr. 111 // Returns the socket address used to connect to the sel_ldr.
112 DescWrapper* secure_socket_addr() const { return secure_socket_addr_.get(); }
113
114 // Returns the socket address used to connect to the module.
112 DescWrapper* socket_addr() const { return socket_addr_.get(); } 115 DescWrapper* socket_addr() const { return socket_addr_.get(); }
113 116
114 // Wraps a raw NaClDesc descriptor. If NULL is returned, caller retains 117 // Wraps a raw NaClDesc descriptor. If NULL is returned, caller retains
115 // ownership of the reference. 118 // ownership of the reference.
116 DescWrapper* Wrap(NaClDesc* raw_desc); 119 DescWrapper* Wrap(NaClDesc* raw_desc);
117 120
118 // As above, but raw_desc is Unref'd on failure. 121 // As above, but raw_desc is Unref'd on failure.
119 DescWrapper* WrapCleanup(NaClDesc* raw_desc); 122 DescWrapper* WrapCleanup(NaClDesc* raw_desc);
120 123
121 // Get post-crash NaClLog data. This include some recent NaClLog 124 // Get post-crash NaClLog data. This include some recent NaClLog
122 // output as well as the LOG_FATAL message. In the case of a severe 125 // output as well as the LOG_FATAL message. In the case of a severe
123 // crash -- or if the peer sel_ldr does not support NaClLog crash 126 // crash -- or if the peer sel_ldr does not support NaClLog crash
124 // logging -- this may return the empty string. 127 // logging -- this may return the empty string.
125 // 128 //
126 // NB: If the NaCl module has not exited or crashed, this call will 129 // NB: If the NaCl module has not exited or crashed, this call will
127 // block. 130 // block.
128 nacl::string GetCrashLogOutput(); 131 nacl::string GetCrashLogOutput();
129 132
130 protected: 133 protected:
131 Handle channel_; 134 Handle channel_;
132 135
133 private: 136 private:
134 // lifetime of bootstrap_socket_ must be at least that of factory_ 137 // lifetime of bootstrap_socket_ must be at least that of factory_
135 scoped_ptr<DescWrapperFactory> factory_; 138 scoped_ptr<DescWrapperFactory> factory_;
136 scoped_ptr<DescWrapper> bootstrap_socket_; 139 scoped_ptr<DescWrapper> bootstrap_socket_;
137 // The socket address returned from sel_ldr for connects. 140 // The socket address returned from sel_ldr for connects.
141 scoped_ptr<DescWrapper> secure_socket_addr_;
138 scoped_ptr<DescWrapper> socket_addr_; 142 scoped_ptr<DescWrapper> socket_addr_;
139 }; 143 };
140 144
141 class SelLdrLauncherStandalone : public SelLdrLauncherBase { 145 class SelLdrLauncherStandalone : public SelLdrLauncherBase {
142 public: 146 public:
143 SelLdrLauncherStandalone(); 147 SelLdrLauncherStandalone();
144 ~SelLdrLauncherStandalone(); 148 ~SelLdrLauncherStandalone();
145 149
146 virtual bool Start(const char* url); 150 virtual bool Start(const char* url);
147 151
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 std::vector<nacl::string> application_argv_; 212 std::vector<nacl::string> application_argv_;
209 213
210 std::vector<Handle> close_after_launch_; 214 std::vector<Handle> close_after_launch_;
211 215
212 scoped_ptr<SelLdrLocator> sel_ldr_locator_; 216 scoped_ptr<SelLdrLocator> sel_ldr_locator_;
213 }; 217 };
214 218
215 } // namespace nacl 219 } // namespace nacl
216 220
217 #endif // NATIVE_CLIENT_SRC_TRUSTED_NONNACL_UTIL_SEL_LDR_LAUNCHER_H_ 221 #endif // NATIVE_CLIENT_SRC_TRUSTED_NONNACL_UTIL_SEL_LDR_LAUNCHER_H_
OLDNEW
« no previous file with comments | « src/trusted/manifest_name_service_proxy/manifest_proxy.c ('k') | src/trusted/nonnacl_util/sel_ldr_launcher_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698