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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 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
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/shell/browser/shell_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25381a5efaae4dc99c6dfb07f37a661260538a88..a512cf8aa0e4b0d3e25fcfce6ab40e0b76356011 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -19,7 +19,6 @@
#include "content/public/common/injection_test_win.h"
#include "content/public/renderer/render_thread.h"
#include "content/renderer/render_thread_impl.h"
-#include "sandbox/win/src/sandbox.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
@@ -28,18 +27,6 @@
#include "ui/gfx/win/dpi.h"
namespace content {
-namespace {
-
-// Windows-only skia sandbox support
-// These are used for GDI-path rendering.
-void SkiaPreCacheFont(const LOGFONT& logfont) {
- RenderThread* render_thread = RenderThread::Get();
- if (render_thread) {
- render_thread->PreCacheFont(logfont);
- }
-}
-
-} // namespace
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
const MainFunctionParams& parameters)
@@ -51,28 +38,10 @@ RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
}
void RendererMainPlatformDelegate::PlatformInitialize() {
- const base::CommandLine& command_line = parameters_.command_line;
-
// Be mindful of what resources you acquire here. They can be used by
// malicious code if the renderer gets compromised.
- bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox);
bool use_direct_write = gfx::win::ShouldUseDirectWrite();
- if (!no_sandbox) {
- // ICU DateFormat class (used in base/time_format.cc) needs to get the
- // Olson timezone ID by accessing the registry keys under
- // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
- // After TimeZone::createDefault is called once here, the timezone ID is
- // cached and there's no more need to access the registry. If the sandbox
- // is disabled, we don't have to make this dummy call.
- scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
-
- if (use_direct_write) {
- InitializeDWriteFontProxy();
- } else {
- SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
- }
- }
blink::WebFontRendering::setUseDirectWrite(use_direct_write);
blink::WebFontRendering::setDeviceScaleFactor(gfx::GetDPIScale());
}
@@ -82,18 +51,7 @@ void RendererMainPlatformDelegate::PlatformUninitialize() {
}
bool RendererMainPlatformDelegate::EnableSandbox() {
- sandbox::TargetServices* target_services =
- parameters_.sandbox_info->target_services;
-
- if (target_services) {
- // Cause advapi32 to load before the sandbox is turned on.
- unsigned int dummy_rand;
- rand_s(&dummy_rand);
-
- target_services->LowerToken();
- return true;
- }
- return false;
+ return true;
}
} // namespace content
« no previous file with comments | « content/public/test/test_launcher.cc ('k') | content/shell/browser/shell_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698