| Index: content/renderer/renderer_main_platform_delegate_win.cc
|
| diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
|
| index 19467d52adce2f28a63bb0a912ed7e20b43d194d..f1b5dabc5a3c7811afe1e1197db12a87714df31a 100644
|
| --- a/content/renderer/renderer_main_platform_delegate_win.cc
|
| +++ b/content/renderer/renderer_main_platform_delegate_win.cc
|
| @@ -19,51 +19,6 @@
|
|
|
| namespace {
|
|
|
| -// In order to have Theme support, we need to connect to the theme service.
|
| -// This needs to be done before we lock down the renderer. Officially this
|
| -// can be done with OpenThemeData() but it fails unless you pass a valid
|
| -// window at least the first time. Interestingly, the very act of creating a
|
| -// window also sets the connection to the theme service.
|
| -void EnableThemeSupportForRenderer(bool no_sandbox) {
|
| - HWINSTA current = NULL;
|
| - HWINSTA winsta0 = NULL;
|
| -
|
| - if (!no_sandbox) {
|
| - current = ::GetProcessWindowStation();
|
| - winsta0 = ::OpenWindowStationW(L"WinSta0", FALSE, GENERIC_READ);
|
| - if (!winsta0 || !::SetProcessWindowStation(winsta0)) {
|
| - // Could not set the alternate window station. There is a possibility
|
| - // that the theme wont be correctly initialized on XP.
|
| - NOTREACHED() << "Unable to switch to WinSt0";
|
| - }
|
| - }
|
| -
|
| - HWND window = ::CreateWindowExW(0, L"Static", L"", WS_POPUP | WS_DISABLED,
|
| - CW_USEDEFAULT, 0, 0, 0, HWND_MESSAGE, NULL,
|
| - ::GetModuleHandleA(NULL), NULL);
|
| - if (!window) {
|
| - DLOG(WARNING) << "failed to enable theme support";
|
| - } else {
|
| - ::DestroyWindow(window);
|
| - }
|
| -
|
| - if (!no_sandbox) {
|
| - // Revert the window station.
|
| - if (!current || !::SetProcessWindowStation(current)) {
|
| - // We failed to switch back to the secure window station. This might
|
| - // confuse the renderer enough that we should kill it now.
|
| - LOG(FATAL) << "Failed to restore alternate window station";
|
| - }
|
| -
|
| - if (!::CloseWindowStation(winsta0)) {
|
| - // We might be leaking a winsta0 handle. This is a security risk, but
|
| - // since we allow fail over to no desktop protection in low memory
|
| - // condition, this is not a big risk.
|
| - NOTREACHED();
|
| - }
|
| - }
|
| -}
|
| -
|
| // Windows-only skia sandbox support
|
| void SkiaPreCacheFont(const LOGFONT& logfont) {
|
| content::RenderThread* render_thread = content::RenderThread::Get();
|
| @@ -112,7 +67,6 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
|
| // malicious code if the renderer gets compromised.
|
| const CommandLine& command_line = parameters_.command_line;
|
| bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox);
|
| - EnableThemeSupportForRenderer(no_sandbox);
|
|
|
| if (!no_sandbox) {
|
| // ICU DateFormat class (used in base/time_format.cc) needs to get the
|
|
|