| 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 780c62154dce1ec958df1c45b96320886c1abe1e..8a2fb94b6c47fd92f870b811e0e1f2aebf7d98f7 100644
|
| --- a/chrome/browser/policy/browser_policy_connector.cc
|
| +++ b/chrome/browser/policy/browser_policy_connector.cc
|
| @@ -116,8 +116,10 @@ void BrowserPolicyConnector::Init() {
|
| DCHECK(!is_initialized()) << "BrowserPolicyConnector::Init() called twice.";
|
| platform_provider_.reset(CreatePlatformProvider());
|
|
|
| - device_management_service_.reset(
|
| - new DeviceManagementService(GetDeviceManagementUrl()));
|
| + if (!device_management_service_.get()) {
|
| + device_management_service_.reset(
|
| + new DeviceManagementService(GetDeviceManagementUrl()));
|
| + }
|
|
|
| #if defined(OS_CHROMEOS)
|
| chromeos::CryptohomeLibrary* cryptohome =
|
| @@ -513,6 +515,11 @@ NetworkConfigurationUpdater*
|
| #endif
|
| }
|
|
|
| +void BrowserPolicyConnector::SetDeviceManagementServiceForTesting(
|
| + scoped_ptr<DeviceManagementService> service) {
|
| + device_management_service_ = service.Pass();
|
| +}
|
| +
|
| // static
|
| void BrowserPolicyConnector::SetPolicyProviderForTesting(
|
| ConfigurationPolicyProvider* provider) {
|
|
|