| 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 ffa4637c6cb71a384efbbbaacdfbc07618e8feb4..85f4726c03729c04eb7e2817cb76ffc1f4273bdf 100644
|
| --- a/chrome/browser/policy/browser_policy_connector.cc
|
| +++ b/chrome/browser/policy/browser_policy_connector.cc
|
| @@ -115,8 +115,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 =
|
| @@ -512,6 +514,11 @@ NetworkConfigurationUpdater*
|
| #endif
|
| }
|
|
|
| +void BrowserPolicyConnector::SetDeviceManagementServiceForTest(
|
| + scoped_ptr<DeviceManagementService> service) {
|
| + device_management_service_ = service.Pass();
|
| +}
|
| +
|
| // static
|
| void BrowserPolicyConnector::SetPolicyProviderForTesting(
|
| ConfigurationPolicyProvider* provider) {
|
|
|