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

Unified Diff: sandbox/src/job.cc

Issue 6816024: Revert 80819 due to failed tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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 | « sandbox/src/interception.cc ('k') | sandbox/src/sandbox_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/job.cc
===================================================================
--- sandbox/src/job.cc (revision 80823)
+++ sandbox/src/job.cc (working copy)
@@ -1,10 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sandbox/src/job.h"
-
-#include "base/win/windows_version.h"
#include "sandbox/src/restricted_token.h"
namespace sandbox {
@@ -51,11 +49,17 @@
jbur.UIRestrictionsClass |= JOB_OBJECT_UILIMIT_EXITWINDOWS;
}
case JOB_UNPROTECTED: {
+ OSVERSIONINFO version_info = {0};
+ version_info.dwOSVersionInfoSize = sizeof(version_info);
+ GetVersionEx(&version_info);
+
// The JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag is not supported on
// Windows 2000. We need a mechanism on Windows 2000 to ensure
// that processes in the job are terminated when the job is closed
- if (base::win::GetVersion() == base::win::VERSION_PRE_XP)
+ if ((5 == version_info.dwMajorVersion) &&
+ (0 == version_info.dwMinorVersion)) {
break;
+ }
jeli.BasicLimitInformation.LimitFlags |=
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
« no previous file with comments | « sandbox/src/interception.cc ('k') | sandbox/src/sandbox_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698