| 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 552de44eb74d1a5fe0d766259fdaf9a6be25e22a..1d39ea67cb1922b5fe66a8eb7d56353d7798c73f 100644
|
| --- a/chrome/browser/policy/browser_policy_connector.cc
|
| +++ b/chrome/browser/policy/browser_policy_connector.cc
|
| @@ -128,10 +128,7 @@ BrowserPolicyConnector::~BrowserPolicyConnector() {
|
| void BrowserPolicyConnector::Init() {
|
| DCHECK(!device_management_service_.get()) <<
|
| "BrowserPolicyConnector::Init() called twice.";
|
| - // Don't create platform providers if running in a unit test, since
|
| - // AsyncPlatformLoader requires deletion on the FILE thread.
|
| - if (MessageLoop::current())
|
| - platform_provider_.reset(CreatePlatformProvider());
|
| + platform_provider_.reset(CreatePlatformProvider());
|
|
|
| device_management_service_.reset(
|
| new DeviceManagementService(GetDeviceManagementUrl()));
|
| @@ -149,10 +146,6 @@ void BrowserPolicyConnector::Init() {
|
|
|
| InitializeDevicePolicy();
|
|
|
| - // Don't bother updating the cache if this is a unit test.
|
| - if (!MessageLoop::current())
|
| - return;
|
| -
|
| // Create the AppPackUpdater to start updating the cache. It requires the
|
| // system request context, which isn't available yet; therefore it is
|
| // created only once the loops are running.
|
| @@ -546,10 +539,6 @@ void BrowserPolicyConnector::InitializeDevicePolicy() {
|
| device_policy_cache,
|
| GetDeviceManagementUrl()));
|
|
|
| - // Skip the final initialization if this is a unit test.
|
| - if (!MessageLoop::current())
|
| - return;
|
| -
|
| // Initialize the subsystem once the message loops are spinning.
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
|
|