Don't initialize the incompatible applications warning in Win8 and under

The feature was never meant to be enabled on other versions than
Windows 10, but I accidentally removed the checks in
https://chromium-review.googlesource.com/c/chromium/src/+/1099976.

Bug: 717696
Change-Id: Ie52736de5dbf609fb702f6aff4a97f8ecac95267
Reviewed-on: https://chromium-review.googlesource.com/1144430
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576957}
diff --git a/chrome/browser/conflicts/module_database_win.cc b/chrome/browser/conflicts/module_database_win.cc
index 07d6662..b8febb7 100644
--- a/chrome/browser/conflicts/module_database_win.cc
+++ b/chrome/browser/conflicts/module_database_win.cc
@@ -15,6 +15,7 @@
 #if defined(GOOGLE_CHROME_BUILD)
 #include "base/feature_list.h"
 #include "base/task_scheduler/post_task.h"
+#include "base/win/windows_version.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/conflicts/third_party_conflicts_manager_win.h"
 #include "chrome/common/chrome_features.h"
@@ -338,8 +339,9 @@
   if (!IsThirdPartyBlockingPolicyEnabled())
     return;
 
-  if (base::FeatureList::IsEnabled(
-          features::kIncompatibleApplicationsWarning) ||
+  if ((base::FeatureList::IsEnabled(
+           features::kIncompatibleApplicationsWarning) &&
+       base::win::GetVersion() >= base::win::VERSION_WIN10) ||
       base::FeatureList::IsEnabled(features::kThirdPartyModulesBlocking)) {
     third_party_conflicts_manager_ =
         std::make_unique<ThirdPartyConflictsManager>(this);
diff --git a/chrome/browser/conflicts/third_party_conflicts_manager_win.cc b/chrome/browser/conflicts/third_party_conflicts_manager_win.cc
index dab5bb5..0672df8 100644
--- a/chrome/browser/conflicts/third_party_conflicts_manager_win.cc
+++ b/chrome/browser/conflicts/third_party_conflicts_manager_win.cc
@@ -19,6 +19,7 @@
 #include "base/task_runner.h"
 #include "base/task_runner_util.h"
 #include "base/task_scheduler/post_task.h"
+#include "base/win/windows_version.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/conflicts/incompatible_applications_updater_win.h"
 #include "chrome/browser/conflicts/installed_applications_win.h"
@@ -126,6 +127,11 @@
   if (!base::FeatureList::IsEnabled(features::kIncompatibleApplicationsWarning))
     return;
 
+  // The incompatible applications warning feature is not available on Windows
+  // versions other than 10.
+  if (base::win::GetVersion() < base::win::VERSION_WIN10)
+    return;
+
   base::PostTaskAndReplyWithResult(
       background_sequence_.get(), FROM_HERE, base::BindOnce([]() {
         return std::make_unique<InstalledApplications>();
diff --git a/chrome/browser/ui/webui/conflicts/conflicts_handler.cc b/chrome/browser/ui/webui/conflicts/conflicts_handler.cc
index 5009ff7..0ba7fba 100644
--- a/chrome/browser/ui/webui/conflicts/conflicts_handler.cc
+++ b/chrome/browser/ui/webui/conflicts/conflicts_handler.cc
@@ -12,6 +12,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/values.h"
+#include "base/win/windows_version.h"
 #include "chrome/browser/conflicts/module_database_win.h"
 #include "chrome/browser/conflicts/module_info_win.h"
 #include "chrome/common/chrome_features.h"
@@ -301,6 +302,9 @@
     case ThirdPartyFeaturesStatus::kPolicyDisabled:
       return "The ThirdPartyBlockingEnabled group policy is disabled.";
     case ThirdPartyFeaturesStatus::kFeatureDisabled:
+      if (base::win::GetVersion() < base::win::VERSION_WIN10)
+        return "The ThirdPartyModulesBlocking feature is disabled.";
+
       return "Both the IncompatibleApplicationsWarning and "
              "ThirdPartyModulesBlocking features are disabled.";
     case ThirdPartyFeaturesStatus::kModuleListInvalid:
@@ -308,12 +312,17 @@
     case ThirdPartyFeaturesStatus::kNoModuleListAvailable:
       return "Disabled - There is no Module List version available.";
     case ThirdPartyFeaturesStatus::kWarningInitialized:
+      DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN10);
       return "The IncompatibleApplicationsWarning feature is enabled, while "
              "the ThirdPartyModulesBlocking feature is disabled.";
     case ThirdPartyFeaturesStatus::kBlockingInitialized:
+      if (base::win::GetVersion() < base::win::VERSION_WIN10)
+        return "The ThirdPartyModulesBlocking feature is enabled.";
+
       return "The ThirdPartyModulesBlocking feature is enabled, while the "
              "IncompatibleApplicationsWarning feature is disabled.";
     case ThirdPartyFeaturesStatus::kWarningAndBlockingInitialized:
+      DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN10);
       return "Both the IncompatibleApplicationsWarning and "
              "ThirdPartyModulesBlocking features are enabled";
   }