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

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

Issue 439713002: Refactoring: Split NaClListener into two delegated classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: components/nacl/loader/nacl_main.cc
diff --git a/components/nacl/loader/nacl_main.cc b/components/nacl/loader/nacl_main.cc
index 9375d1c4af1c3dd484a581882179b4b1c8915b04..5baf57af03a34eb42c54a3299c594d464a261ee6 100644
--- a/components/nacl/loader/nacl_main.cc
+++ b/components/nacl/loader/nacl_main.cc
@@ -5,12 +5,15 @@
#include "build/build_config.h"
#include "base/command_line.h"
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
#include "base/timer/hi_res_timer_manager.h"
+#include "components/nacl/loader/listener_delegate.h"
#include "components/nacl/loader/nacl_listener.h"
#include "components/nacl/loader/nacl_main_platform_delegate.h"
+#include "components/nacl/loader/sfi_listener_delegate.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
@@ -41,11 +44,13 @@ int NaClMain(const content::MainFunctionParams& parameters) {
if (!no_sandbox) {
platform.EnableSandbox();
}
- NaClListener listener;
+
+ nacl::SfiListenerDelegate* delegate = new nacl::SfiListenerDelegate;
#if defined(OS_POSIX)
- listener.set_number_of_cores(number_of_cores);
+ delegate->set_number_of_cores(number_of_cores);
#endif
+ NaClListener listener(make_scoped_ptr<nacl::ListenerDelegate>(delegate));
listener.Listen();
#else
NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";

Powered by Google App Engine
This is Rietveld 408576698