Move SystemProxyManager out of policy

System-proxy is a proxy authentication daemon on Chrome OS which
authenticates PlayStore apps and system services to remote web proxies.

This CL separates the general SystemProxyManager logic from the policy
handling code and moves the SystemProxyManager initialization from the
BrowserPolicyConnectorChromeOS class to the BrowserProcessPlatformPart.

The code is largely unchanged, with the following exceptions:
- methods added to create a SystemProxyManages static instance: Get(),
Initialize(), ShutDown().
- method SetPolicySettings() added to set the SystemProxySettings device
policy info.

Bug:b/182889234
Test: Adapted the browser tests:
- SystemProxyManagerBrowserTest.*
- SystemProxyManagerPolicyCredentialsBrowserTest.*
- ProxyResolutionServiceProviderSystemProxyPolicyTest.*
- BrowsingDataRemoverBrowserTest.SystemProxyClearsUserCredentials
Adapted the unit tests:
- SystemProxyManagedTest.*
Added:
- SystemProxyHandlerTest.*

Manual tests:
- enterprise: system services (tlsdate) and the PlayStore apps get
  authenticated through system-proxy when enabled by policy;
- consumer: verified that system-proxy is not accidentally started.

Tast tests: network.SystemProxyForArc,
   network.SystemProxyForSystemServices, policy.SystemProxySettings

Change-Id: If50ae74949eccde22deecaa708d6f7f773a2ebd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2764502
Reviewed-by: Andreea-Elena Costinas <[email protected]>
Reviewed-by: David Roger <[email protected]>
Reviewed-by: Kyle Horimoto <[email protected]>
Reviewed-by: Pavol Marko <[email protected]>
Commit-Queue: Andreea-Elena Costinas <[email protected]>
Cr-Commit-Position: refs/heads/master@{#869484}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 1d36f71c..c3b3d0e 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -181,9 +181,9 @@
 #include "chrome/browser/chromeos/device_name_store.h"
 #include "chrome/browser/chromeos/extensions/extensions_permissions_tracker.h"
 #include "chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h"
+#include "chrome/browser/chromeos/net/system_proxy_manager.h"
 #include "chrome/browser/chromeos/platform_keys/key_permissions/key_permissions_manager_impl.h"
 #include "chrome/browser/chromeos/policy/system_features_disable_list_policy_handler.h"
-#include "chrome/browser/chromeos/policy/system_proxy_manager.h"
 #include "chrome/browser/component_updater/metadata_table_chromeos.h"
 #include "chrome/browser/ui/webui/signin/inline_login_handler_chromeos.h"
 #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -1128,7 +1128,7 @@
   policy::ExtensionInstallEventLogManagerWrapper::RegisterProfilePrefs(
       registry);
   policy::StatusCollector::RegisterProfilePrefs(registry);
-  policy::SystemProxyManager::RegisterProfilePrefs(registry);
+  chromeos::SystemProxyManager::RegisterProfilePrefs(registry);
   RegisterChromeLauncherUserPrefs(registry);
   ::onc::RegisterProfilePrefs(registry);
   ash::cert_provisioning::RegisterProfilePrefs(registry);