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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 1419483002: Windows sbox: Warmup locales before sandbox lockdown (and tests) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use decltype in function ptr typedef of GetUserDefaultLocaleName Created 5 years 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 unified diff | Download patch
« no previous file with comments | « components/nacl/loader/nacl_main_platform_delegate_win.cc ('k') | sandbox/win/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 bool RendererMainPlatformDelegate::EnableSandbox() { 82 bool RendererMainPlatformDelegate::EnableSandbox() {
83 sandbox::TargetServices* target_services = 83 sandbox::TargetServices* target_services =
84 parameters_.sandbox_info->target_services; 84 parameters_.sandbox_info->target_services;
85 85
86 if (target_services) { 86 if (target_services) {
87 // Cause advapi32 to load before the sandbox is turned on. 87 // Cause advapi32 to load before the sandbox is turned on.
88 unsigned int dummy_rand; 88 unsigned int dummy_rand;
89 rand_s(&dummy_rand); 89 rand_s(&dummy_rand);
90 // Warm up language subsystems before the sandbox is turned on.
91 ::GetUserDefaultLangID();
92 ::GetUserDefaultLCID();
93 90
94 target_services->LowerToken(); 91 target_services->LowerToken();
95 return true; 92 return true;
96 } 93 }
97 return false; 94 return false;
98 } 95 }
99 96
100 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_main_platform_delegate_win.cc ('k') | sandbox/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698