| 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/cloud_policy_manager.h" | 5 #include "chrome/browser/policy/cloud/cloud_policy_manager.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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 11 #include "chrome/browser/policy/cloud/cloud_policy_service.h" | 11 #include "chrome/browser/policy/cloud/cloud_policy_service.h" |
| 12 #include "chrome/browser/policy/policy_bundle.h" | 12 #include "chrome/browser/policy/policy_bundle.h" |
| 13 #include "chrome/browser/policy/policy_map.h" | 13 #include "components/policy/core/common/policy_map.h" |
| 14 | 14 |
| 15 namespace policy { | 15 namespace policy { |
| 16 | 16 |
| 17 CloudPolicyManager::CloudPolicyManager( | 17 CloudPolicyManager::CloudPolicyManager( |
| 18 const PolicyNamespaceKey& policy_ns_key, | 18 const PolicyNamespaceKey& policy_ns_key, |
| 19 CloudPolicyStore* cloud_policy_store, | 19 CloudPolicyStore* cloud_policy_store, |
| 20 const scoped_refptr<base::SequencedTaskRunner>& task_runner) | 20 const scoped_refptr<base::SequencedTaskRunner>& task_runner) |
| 21 : core_(policy_ns_key, cloud_policy_store, task_runner), | 21 : core_(policy_ns_key, cloud_policy_store, task_runner), |
| 22 waiting_for_policy_refresh_(false) { | 22 waiting_for_policy_refresh_(false) { |
| 23 store()->AddObserver(this); | 23 store()->AddObserver(this); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 .CopyFrom(store()->policy_map()); | 81 .CopyFrom(store()->policy_map()); |
| 82 return bundle.Pass(); | 82 return bundle.Pass(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void CloudPolicyManager::OnRefreshComplete(bool success) { | 85 void CloudPolicyManager::OnRefreshComplete(bool success) { |
| 86 waiting_for_policy_refresh_ = false; | 86 waiting_for_policy_refresh_ = false; |
| 87 CheckAndPublishPolicy(); | 87 CheckAndPublishPolicy(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace policy | 90 } // namespace policy |
| OLD | NEW |