[Installer Downloader] Show Infobar when requirements are met

Shortly after the browser startup, the Installer downloader infobar
should be shown if a set of requirements are met.

To make testing easier, the show logic is wrap in the
InstallerDownloaderInfobarCoordinator.

In addition, in the build file the headers and sources are separate to
prevents cycle dependency on c/b/ui.

Change-Id: I1cb89c6a411f73eefc3eae852e0e48f25154fa1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6539246
Reviewed-by: Kaan Alsan <[email protected]>
Reviewed-by: Greg Thompson <[email protected]>
Commit-Queue: Daniel Soromou <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1461324}
diff --git a/chrome/browser/global_features.h b/chrome/browser/global_features.h
index 098e749..aef6e032 100644
--- a/chrome/browser/global_features.h
+++ b/chrome/browser/global_features.h
@@ -8,6 +8,7 @@
 #include <memory.h>
 
 #include "base/functional/callback.h"
+#include "build/branding_buildflags.h"
 #include "build/build_config.h"
 #include "chrome/common/buildflags.h"
 
@@ -29,6 +30,10 @@
 
 class ApplicationLocaleStorage;
 
+namespace installer_downloader {
+class InstallerDownloaderController;
+}
+
 // This class owns the core controllers for features that are globally
 // scoped on desktop. It can be subclassed by tests to perform
 // dependency injection.
@@ -82,6 +87,13 @@
     return application_locale_storage_.get();
   }
 
+#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+  installer_downloader::InstallerDownloaderController*
+  installer_downloader_controller() {
+    return installer_downloader_controller_.get();
+  }
+#endif
+
  protected:
   GlobalFeatures();
 
@@ -113,6 +125,11 @@
 #endif
 
   std::unique_ptr<ApplicationLocaleStorage> application_locale_storage_;
+
+#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+  std::unique_ptr<installer_downloader::InstallerDownloaderController>
+      installer_downloader_controller_;
+#endif
 };
 
 #endif  // CHROME_BROWSER_GLOBAL_FEATURES_H_