| Index: chrome/browser/policy/browser_policy_connector.cc
|
| diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
|
| index 997e1870caac9d25aebad7d386cd29ac74d103cb..455df5f82f2523b5f5c392ded1a91cc1931df8ba 100644
|
| --- a/chrome/browser/policy/browser_policy_connector.cc
|
| +++ b/chrome/browser/policy/browser_policy_connector.cc
|
| @@ -58,6 +58,7 @@
|
| #include "chrome/browser/chromeos/policy/device_status_collector.h"
|
| #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
|
| #include "chrome/browser/chromeos/policy/network_configuration_updater.h"
|
| +#include "chrome/browser/chromeos/policy/network_configuration_updater2.h"
|
| #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
|
| #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h"
|
| #include "chrome/browser/chromeos/settings/cros_settings.h"
|
| @@ -66,6 +67,7 @@
|
| #include "chrome/browser/chromeos/system/statistics_provider.h"
|
| #include "chrome/browser/chromeos/system/timezone_settings.h"
|
| #include "chrome/browser/policy/cloud/resource_cache.h"
|
| +#include "chromeos/chromeos_switches.h"
|
| #include "chromeos/dbus/cryptohome_client.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| #else
|
| @@ -304,11 +306,17 @@ void BrowserPolicyConnector::InitializeUserPolicy(
|
| const std::string& user_name,
|
| bool is_public_account,
|
| bool wait_for_policy_fetch) {
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| +
|
| // If the user is managed then importing certificates from ONC policy is
|
| // allowed, otherwise it's not. Update this flag once the user has signed in,
|
| // and before user policy is loaded.
|
| - GetNetworkConfigurationUpdater()->set_allow_trusted_certificates_from_policy(
|
| - GetUserAffiliation(user_name) == USER_AFFILIATION_MANAGED);
|
| + if (!command_line->HasSwitch(
|
| + chromeos::switches::kUseNewNetworkConfigurationHandlers)) {
|
| + GetNetworkConfigurationUpdater()->
|
| + set_allow_trusted_certificates_from_policy(
|
| + GetUserAffiliation(user_name) == USER_AFFILIATION_MANAGED);
|
| + }
|
|
|
| // Re-initializing user policy is disallowed for two reasons:
|
| // (a) Existing profiles may hold pointers to |user_cloud_policy_manager_|.
|
| @@ -316,8 +324,6 @@ void BrowserPolicyConnector::InitializeUserPolicy(
|
| // correctly is impossible for re-initialization.
|
| CHECK(!user_cloud_policy_manager_);
|
|
|
| - CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| -
|
| base::FilePath profile_dir;
|
| CHECK(PathService::Get(chrome::DIR_USER_DATA, &profile_dir));
|
| profile_dir = profile_dir.Append(
|
| @@ -403,6 +409,15 @@ NetworkConfigurationUpdater*
|
| return network_configuration_updater_.get();
|
| }
|
|
|
| +NetworkConfigurationUpdater2*
|
| + BrowserPolicyConnector::GetNetworkConfigurationUpdater2() {
|
| + if (!network_configuration_updater2_) {
|
| + network_configuration_updater2_.reset(new NetworkConfigurationUpdater2(
|
| + GetPolicyService()));
|
| + }
|
| + return network_configuration_updater2_.get();
|
| +}
|
| +
|
| net::CertTrustAnchorProvider*
|
| BrowserPolicyConnector::GetCertTrustAnchorProvider() {
|
| return GetNetworkConfigurationUpdater()->GetCertTrustAnchorProvider();
|
|
|