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

Side by Side Diff: content/common/sandbox_policy.cc

Issue 9696053: Revert 125989 - Temporarily disable image transport surface on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025_52/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/image_transport_surface_win.cc ('k') | no next file » | 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/common/sandbox_policy.h" 5 #include "content/common/sandbox_policy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 sandbox::USER_LIMITED); 315 sandbox::USER_LIMITED);
316 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); 316 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
317 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); 317 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
318 } else { 318 } else {
319 if (cmd_line->GetSwitchValueASCII(switches::kUseGL) == 319 if (cmd_line->GetSwitchValueASCII(switches::kUseGL) ==
320 gfx::kGLImplementationSwiftShaderName || 320 gfx::kGLImplementationSwiftShaderName ||
321 cmd_line->HasSwitch(switches::kReduceGpuSandbox)) { 321 cmd_line->HasSwitch(switches::kReduceGpuSandbox)) {
322 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, 322 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
323 sandbox::USER_LIMITED); 323 sandbox::USER_LIMITED);
324 } else { 324 } else {
325 // Temporarily reduce sandbox level while we disable the use of image
326 // transport surface in all versions of windows.
327 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, 325 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
328 sandbox::USER_LIMITED); 326 sandbox::USER_RESTRICTED);
329 } 327 }
330 328
331 // UI restrictions break when we access Windows from outside our job. 329 // UI restrictions break when we access Windows from outside our job.
332 // However, we don't want a proxy window in this process because it can 330 // However, we don't want a proxy window in this process because it can
333 // introduce deadlocks where the renderer blocks on the gpu, which in 331 // introduce deadlocks where the renderer blocks on the gpu, which in
334 // turn blocks on the browser UI thread. So, instead we forgo a window 332 // turn blocks on the browser UI thread. So, instead we forgo a window
335 // message pump entirely and just add job restrictions to prevent child 333 // message pump entirely and just add job restrictions to prevent child
336 // processes. 334 // processes.
337 policy->SetJobLevel(sandbox::JOB_LIMITED_USER, 335 policy->SetJobLevel(sandbox::JOB_LIMITED_USER,
338 JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS | 336 JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 586
589 // Help the process a little. It can't start the debugger by itself if 587 // Help the process a little. It can't start the debugger by itself if
590 // the process is in a sandbox. 588 // the process is in a sandbox.
591 if (child_needs_help) 589 if (child_needs_help)
592 base::debug::SpawnDebuggerOnProcess(target.dwProcessId); 590 base::debug::SpawnDebuggerOnProcess(target.dwProcessId);
593 591
594 return process; 592 return process;
595 } 593 }
596 594
597 } // namespace sandbox 595 } // namespace sandbox
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698