cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / components / nacl / loader / nacl_main_platform_delegate_win.cc
blobe4d0ad5520d6cf2e9e7dca62fa10a440310278f4
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/nacl/loader/nacl_main_platform_delegate.h"
7 #include "base/logging.h"
8 #include "content/public/common/main_function_params.h"
9 #include "sandbox/win/src/sandbox.h"
11 void NaClMainPlatformDelegate::EnableSandbox(
12 const content::MainFunctionParams& parameters) {
13 sandbox::TargetServices* target_services =
14 parameters.sandbox_info->target_services;
16 CHECK(target_services) << "NaCl-Win EnableSandbox: No Target Services!";
17 // Cause advapi32 to load before the sandbox is turned on.
18 unsigned int dummy_rand;
19 rand_s(&dummy_rand);
20 // Warm up language subsystems before the sandbox is turned on.
21 ::GetUserDefaultLangID();
22 ::GetUserDefaultLCID();
24 // Turn the sandbox on.
25 target_services->LowerToken();