diff options
Diffstat (limited to 'chromium/components/nacl/loader/nacl_main_platform_delegate.h')
-rw-r--r-- | chromium/components/nacl/loader/nacl_main_platform_delegate.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/chromium/components/nacl/loader/nacl_main_platform_delegate.h b/chromium/components/nacl/loader/nacl_main_platform_delegate.h index ca740b85bcd..191831cfefe 100644 --- a/chromium/components/nacl/loader/nacl_main_platform_delegate.h +++ b/chromium/components/nacl/loader/nacl_main_platform_delegate.h @@ -5,20 +5,38 @@ #ifndef CHROME_NACL_NACL_MAIN_PLATFORM_DELEGATE_H_ #define CHROME_NACL_NACL_MAIN_PLATFORM_DELEGATE_H_ -#include "base/basictypes.h" +#include "base/native_library.h" #include "content/public/common/main_function_params.h" +typedef bool (*RunNaClLoaderTests)(void); +const char kNaClLoaderTestCall[] = "RunNaClLoaderTests"; + class NaClMainPlatformDelegate { public: explicit NaClMainPlatformDelegate( const content::MainFunctionParams& parameters); ~NaClMainPlatformDelegate(); + // Called first thing and last thing in the process' lifecycle, i.e. before + // the sandbox is enabled. + void PlatformInitialize(); + void PlatformUninitialize(); + + // Gives us an opportunity to initialize state used for tests before enabling + // the sandbox. + void InitSandboxTests(bool no_sandbox); + // Initiate Lockdown. void EnableSandbox(); + // Runs the sandbox tests for the NaCl Loader, if tests supplied. + // Cannot run again, after this (resources freed). + // Returns false if the tests are supplied and fail. + bool RunSandboxTests(); + private: const content::MainFunctionParams& parameters_; + base::NativeLibrary sandbox_test_module_; DISALLOW_COPY_AND_ASSIGN(NaClMainPlatformDelegate); }; |