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

Unified Diff: chrome/nacl/nacl_listener.cc

Issue 10020002: Pass the nacl start parameters as a struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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: chrome/nacl/nacl_listener.cc
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
index d0e0a8a72ff45665fc4b70805fc74fbcbf2e0301..f8598c2c65d05803842bd9661502df6eda370613 100644
--- a/chrome/nacl/nacl_listener.cc
+++ b/chrome/nacl/nacl_listener.cc
@@ -152,22 +152,21 @@ void NaClListener::Listen() {
bool NaClListener::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NaClListener, msg)
- IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr)
+ IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnMsgStart)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
}
-void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles,
- const std::string& validation_cache_key,
- const std::string& version,
- bool enable_exception_handling) {
+void NaClListener::OnMsgStart(const nacl::NaClStartParams& params) {
struct NaClChromeMainArgs *args = NaClChromeMainArgsCreate();
if (args == NULL) {
LOG(ERROR) << "NaClChromeMainArgsCreate() failed";
return;
}
+ std::vector<nacl::FileDescriptor> handles = params.handles;
+
#if defined(OS_LINUX) || defined(OS_MACOSX)
args->create_memory_object_func = CreateMemoryObject;
# if defined(OS_MACOSX)
@@ -196,12 +195,13 @@ void NaClListener::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles,
LOG(INFO) << "NaCl validation cache enabled.";
// The cache structure is not freed and exists until the NaCl process exits.
args->validation_cache = CreateValidationCache(
- new BrowserValidationDBProxy(this), validation_cache_key, version);
+ new BrowserValidationDBProxy(this), params.validation_cache_key,
+ params.version);
}
CHECK(handles.size() == 1);
args->imc_bootstrap_handle = nacl::ToNativeHandle(handles[0]);
- args->enable_exception_handling = enable_exception_handling;
+ args->enable_exception_handling = params.enable_exception_handling;
args->enable_debug_stub = debug_enabled_;
NaClChromeMainStart(args);
NOTREACHED();
« chrome/browser/nacl_host/nacl_process_host.cc ('K') | « chrome/nacl/nacl_listener.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698