Skip to content

Commit

Permalink
Skip exclude Win Defender paths for Win7.
Browse files Browse the repository at this point in the history
Bug: 1373313
Change-Id: Iaa58eeaadbac80c20d1205ab468a595c2e2f50f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4039485
Commit-Queue: Xiaoling Bao <xiaolingbao@chromium.org>
Auto-Submit: Xiaoling Bao <xiaolingbao@chromium.org>
Reviewed-by: S Ganesh <ganesh@chromium.org>
Commit-Queue: S Ganesh <ganesh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1073703}
  • Loading branch information
gxbao authored and Chromium LUCI CQ committed Nov 19, 2022
1 parent 98c5c00 commit 2aebf69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chrome/updater/unittest_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

#if BUILDFLAG(IS_WIN)
#include "base/win/windows_version.h"
#endif

namespace updater::test {

const char kChromeAppId[] = "{8A69D345-D564-463C-AFF1-A69D9E530F96}";
Expand Down Expand Up @@ -93,6 +97,11 @@ void MaybeExcludePathsFromWindowsDefender() {
if (!command_line->HasSwitch(kTestLauncherExcludePathsFromWindowDefender))
return;

if (base::win::GetVersion() <= base::win::Version::WIN7) {
VLOG(1) << "Skip changing Windows Defender settings for Win7 and below.";
return;
}

base::FilePath program_files;
base::FilePath program_files_x86;
base::FilePath local_app_data;
Expand Down

0 comments on commit 2aebf69

Please sign in to comment.