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

Unified Diff: content/ppapi_plugin/ppapi_thread.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/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 96770b527d0a9ef82ab305badd465700d9034558..f7d080153f2e5c6bc4abcb547f0178428d76acba 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -56,7 +56,6 @@
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "content/child/font_warmup_win.h"
-#include "sandbox/win/src/sandbox.h"
#elif defined(OS_MACOSX)
#include "content/common/sandbox_init_mac.h"
#endif
@@ -64,8 +63,6 @@
#if defined(OS_WIN)
const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll";
-extern sandbox::TargetServices* g_target_services;
-
// Used by EnumSystemLocales for warming up.
static BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) {
return TRUE;
@@ -359,48 +356,6 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
// If code subsequently tries to exit using abort(), force a crash (since
// otherwise these would be silent terminations and fly under the radar).
base::win::SetAbortBehaviorForCrashReporting();
-
- // Once we lower the token the sandbox is locked down and no new modules
- // can be loaded. TODO(cpu): consider changing to the loading style of
- // regular plugins.
- if (g_target_services) {
- // Let Flash and Widevine CDM adapter load DXVA before lockdown on Vista+.
- if (permissions.HasPermission(ppapi::PERMISSION_FLASH) ||
- path.BaseName().MaybeAsASCII() == kWidevineCdmAdapterFileName) {
- if (base::win::OSInfo::GetInstance()->version() >=
- base::win::VERSION_VISTA) {
- LoadLibraryA("dxva2.dll");
- }
- }
-
- if (permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
- if (base::win::OSInfo::GetInstance()->version() >=
- base::win::VERSION_WIN7) {
- base::CPU cpu;
- if (cpu.vendor_name() == "AuthenticAMD") {
- // The AMD crypto acceleration is only AMD Bulldozer and above.
-#if defined(_WIN64)
- LoadLibraryA("amdhcp64.dll");
-#else
- LoadLibraryA("amdhcp32.dll");
-#endif
- }
- }
- }
-
- // Cause advapi32 to load before the sandbox is turned on.
- unsigned int dummy_rand;
- rand_s(&dummy_rand);
-
- WarmupWindowsLocales(permissions);
-
- if (!base::win::IsUser32AndGdi32Available() &&
- permissions.HasPermission(ppapi::PERMISSION_FLASH)) {
- PatchGdiFontEnumeration(path);
- }
-
- g_target_services->LowerToken();
- }
#endif
if (is_broker_) {
« no previous file with comments | « content/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698