| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/policy/cloud_policy_core.h" | 5 #include "chrome/browser/policy/cloud_policy_core.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/policy/cloud_policy_client.h" | 11 #include "chrome/browser/policy/cloud_policy_client.h" |
| 11 #include "chrome/browser/policy/cloud_policy_refresh_scheduler.h" | 12 #include "chrome/browser/policy/cloud_policy_refresh_scheduler.h" |
| 12 #include "chrome/browser/policy/cloud_policy_service.h" | 13 #include "chrome/browser/policy/cloud_policy_service.h" |
| 13 #include "chrome/browser/policy/cloud_policy_store.h" | 14 #include "chrome/browser/policy/cloud_policy_store.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | |
| 15 | 15 |
| 16 namespace policy { | 16 namespace policy { |
| 17 | 17 |
| 18 CloudPolicyCore::CloudPolicyCore(const PolicyNamespaceKey& key, | 18 CloudPolicyCore::CloudPolicyCore(const PolicyNamespaceKey& key, |
| 19 CloudPolicyStore* store) | 19 CloudPolicyStore* store) |
| 20 : policy_ns_key_(key), | 20 : policy_ns_key_(key), |
| 21 store_(store) {} | 21 store_(store) {} |
| 22 | 22 |
| 23 CloudPolicyCore::~CloudPolicyCore() {} | 23 CloudPolicyCore::~CloudPolicyCore() {} |
| 24 | 24 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 base::Unretained(this))); | 56 base::Unretained(this))); |
| 57 UpdateRefreshDelayFromPref(); | 57 UpdateRefreshDelayFromPref(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void CloudPolicyCore::UpdateRefreshDelayFromPref() { | 60 void CloudPolicyCore::UpdateRefreshDelayFromPref() { |
| 61 if (refresh_scheduler_.get() && refresh_delay_.get()) | 61 if (refresh_scheduler_.get() && refresh_delay_.get()) |
| 62 refresh_scheduler_->SetRefreshDelay(refresh_delay_->GetValue()); | 62 refresh_scheduler_->SetRefreshDelay(refresh_delay_->GetValue()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace policy | 65 } // namespace policy |
| OLD | NEW |