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

Unified Diff: components/nacl/loader/nacl_helper_linux.cc

Issue 439713002: Refactoring: Split NaClListener into two delegated classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and redesign based on Mark's comment. Created 6 years, 4 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
« no previous file with comments | « components/nacl.gyp ('k') | components/nacl/loader/nacl_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_helper_linux.cc
diff --git a/components/nacl/loader/nacl_helper_linux.cc b/components/nacl/loader/nacl_helper_linux.cc
index 8c042d02688e6a039b5d565f8e43eb138e00917f..9789199828eba76b6cd575fafa0a7f00f5945a6b 100644
--- a/components/nacl/loader/nacl_helper_linux.cc
+++ b/components/nacl/loader/nacl_helper_linux.cc
@@ -35,6 +35,7 @@
#include "components/nacl/common/nacl_switches.h"
#include "components/nacl/loader/nacl_listener.h"
#include "components/nacl/loader/nonsfi/irt_exception_handling.h"
+#include "components/nacl/loader/nonsfi/nonsfi_listener.h"
#include "components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h"
#include "content/public/common/child_process_sandbox_support_linux.h"
#include "content/public/common/content_descriptors.h"
@@ -106,11 +107,15 @@ void BecomeNaClLoader(base::ScopedFD browser_fd,
browser_fd.release());
base::MessageLoopForIO main_message_loop;
- NaClListener listener;
- listener.set_uses_nonsfi_mode(uses_nonsfi_mode);
- listener.set_prereserved_sandbox_size(system_info.prereserved_sandbox_size);
- listener.set_number_of_cores(system_info.number_of_cores);
- listener.Listen();
+ if (uses_nonsfi_mode) {
+ nacl::nonsfi::NonSfiListener listener;
+ listener.Listen();
+ } else {
+ NaClListener listener;
+ listener.set_prereserved_sandbox_size(system_info.prereserved_sandbox_size);
+ listener.set_number_of_cores(system_info.number_of_cores);
+ listener.Listen();
+ }
_exit(0);
}
« no previous file with comments | « components/nacl.gyp ('k') | components/nacl/loader/nacl_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698