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; |