| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/policy/device_active_directory_policy_manager.
h" | 5 #include "chrome/browser/chromeos/policy/device_active_directory_policy_manager.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 void DeviceActiveDirectoryPolicyManager::Init(SchemaRegistry* registry) { | 25 void DeviceActiveDirectoryPolicyManager::Init(SchemaRegistry* registry) { |
| 26 ConfigurationPolicyProvider::Init(registry); | 26 ConfigurationPolicyProvider::Init(registry); |
| 27 | 27 |
| 28 store_->AddObserver(this); | 28 store_->AddObserver(this); |
| 29 if (!store_->is_initialized()) { | 29 if (!store_->is_initialized()) { |
| 30 store_->Load(); | 30 store_->Load(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 // Does nothing if |store_| hasn't yet initialized. | 33 // Does nothing if |store_| hasn't yet initialized. |
| 34 PublishPolicy(); | 34 PublishPolicy(); |
| 35 |
| 36 RefreshPolicies(); |
| 35 } | 37 } |
| 36 | 38 |
| 37 void DeviceActiveDirectoryPolicyManager::Shutdown() { | 39 void DeviceActiveDirectoryPolicyManager::Shutdown() { |
| 38 store_->RemoveObserver(this); | 40 store_->RemoveObserver(this); |
| 39 ConfigurationPolicyProvider::Shutdown(); | 41 ConfigurationPolicyProvider::Shutdown(); |
| 40 } | 42 } |
| 41 | 43 |
| 42 bool DeviceActiveDirectoryPolicyManager::IsInitializationComplete( | 44 bool DeviceActiveDirectoryPolicyManager::IsInitializationComplete( |
| 43 PolicyDomain domain) const { | 45 PolicyDomain domain) const { |
| 44 if (domain == POLICY_DOMAIN_CHROME) | 46 if (domain == POLICY_DOMAIN_CHROME) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void DeviceActiveDirectoryPolicyManager::OnPolicyRefreshed(bool success) { | 94 void DeviceActiveDirectoryPolicyManager::OnPolicyRefreshed(bool success) { |
| 93 if (!success) { | 95 if (!success) { |
| 94 LOG(ERROR) << "Active Directory policy refresh failed."; | 96 LOG(ERROR) << "Active Directory policy refresh failed."; |
| 95 } | 97 } |
| 96 // Load independently of success or failure to keep up to date with whatever | 98 // Load independently of success or failure to keep up to date with whatever |
| 97 // has happened on the authpolicyd / session manager side. | 99 // has happened on the authpolicyd / session manager side. |
| 98 store_->Load(); | 100 store_->Load(); |
| 99 } | 101 } |
| 100 | 102 |
| 101 } // namespace policy | 103 } // namespace policy |
| OLD | NEW |