| Index: chrome/browser/policy/device_management_policy_cache.cc
|
| diff --git a/chrome/browser/policy/device_management_policy_cache.cc b/chrome/browser/policy/device_management_policy_cache.cc
|
| index ff072eb150ccdba466aa128378e897c35b829e96..75f72bf4ce746dfc5cdf07470cebafcd1bf190d8 100644
|
| --- a/chrome/browser/policy/device_management_policy_cache.cc
|
| +++ b/chrome/browser/policy/device_management_policy_cache.cc
|
| @@ -138,26 +138,18 @@ DictionaryValue* DeviceManagementPolicyCache::GetPolicy() {
|
| return policy_->DeepCopy();
|
| }
|
|
|
| -void DeviceManagementPolicyCache::SetDeviceUnmanaged(bool is_device_unmanaged) {
|
| - if (is_device_unmanaged_ == is_device_unmanaged)
|
| - return;
|
| -
|
| - is_device_unmanaged_ = is_device_unmanaged;
|
| +void DeviceManagementPolicyCache::SetDeviceUnmanaged() {
|
| + is_device_unmanaged_ = true;
|
| base::Time now(base::Time::NowFromSystemTime());
|
| - DictionaryValue* empty = new DictionaryValue();
|
| {
|
| AutoLock lock(lock_);
|
| - policy_.reset(empty);
|
| + policy_.reset(new DictionaryValue);
|
| last_policy_refresh_time_ = now;
|
| }
|
| BrowserThread::PostTask(
|
| BrowserThread::FILE,
|
| FROM_HERE,
|
| - new PersistPolicyTask(backing_file_path_,
|
| - (is_device_unmanaged ? NULL
|
| - : new em::DevicePolicyResponse()),
|
| - now,
|
| - is_device_unmanaged_));
|
| + new PersistPolicyTask(backing_file_path_, NULL, now, true));
|
| }
|
|
|
| // static
|
|
|