Emily Andrews | 7cd71e0 | 2022-02-23 22:30:32 | [diff] [blame] | 1 | // Copyright 2021 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "sandbox/features.h" |
| 6 | |
| 7 | namespace sandbox::features { |
| 8 | #if BUILDFLAG(IS_WIN) |
| 9 | bool IsAppContainerSandboxSupported() { |
Will Harris | 3e11fe7 | 2022-04-22 22:29:41 | [diff] [blame] | 10 | // Some APIs used for LPAC are unsupported below Windows 10 RS2 (1703 build |
| 11 | // 15063). In addition, it is not possible to apply process mitigations to an |
| 12 | // app container process until RS5. Place a check here in a central place. |
Emily Andrews | 7cd71e0 | 2022-02-23 22:30:32 | [diff] [blame] | 13 | static const bool supported = |
Will Harris | 3e11fe7 | 2022-04-22 22:29:41 | [diff] [blame] | 14 | base::win::GetVersion() >= base::win::Version::WIN10_RS5; |
Emily Andrews | 7cd71e0 | 2022-02-23 22:30:32 | [diff] [blame] | 15 | return supported; |
| 16 | } |
| 17 | #endif |
Will Harris | 3e11fe7 | 2022-04-22 22:29:41 | [diff] [blame] | 18 | } // namespace sandbox::features |