| 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/chromeos/policy/device_local_account_policy_service.h" | 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 &core_, | 188 &core_, |
| 189 invalidation_service_provider_)); | 189 invalidation_service_provider_)); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void DeviceLocalAccountPolicyBroker::UpdateRefreshDelay() { | 192 void DeviceLocalAccountPolicyBroker::UpdateRefreshDelay() { |
| 193 if (core_.refresh_scheduler()) { | 193 if (core_.refresh_scheduler()) { |
| 194 const base::Value* policy_value = | 194 const base::Value* policy_value = |
| 195 store_->policy_map().GetValue(key::kPolicyRefreshRate); | 195 store_->policy_map().GetValue(key::kPolicyRefreshRate); |
| 196 int delay = 0; | 196 int delay = 0; |
| 197 if (policy_value && policy_value->GetAsInteger(&delay)) | 197 if (policy_value && policy_value->GetAsInteger(&delay)) |
| 198 core_.refresh_scheduler()->SetRefreshDelay(delay); | 198 core_.refresh_scheduler()->SetDesiredRefreshDelay(delay); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 std::string DeviceLocalAccountPolicyBroker::GetDisplayName() const { | 202 std::string DeviceLocalAccountPolicyBroker::GetDisplayName() const { |
| 203 std::string display_name; | 203 std::string display_name; |
| 204 const base::Value* display_name_value = | 204 const base::Value* display_name_value = |
| 205 store_->policy_map().GetValue(policy::key::kUserDisplayName); | 205 store_->policy_map().GetValue(policy::key::kUserDisplayName); |
| 206 if (display_name_value) | 206 if (display_name_value) |
| 207 display_name_value->GetAsString(&display_name); | 207 display_name_value->GetAsString(&display_name); |
| 208 return display_name; | 208 return display_name; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 } | 562 } |
| 563 return nullptr; | 563 return nullptr; |
| 564 } | 564 } |
| 565 | 565 |
| 566 void DeviceLocalAccountPolicyService::NotifyPolicyUpdated( | 566 void DeviceLocalAccountPolicyService::NotifyPolicyUpdated( |
| 567 const std::string& user_id) { | 567 const std::string& user_id) { |
| 568 FOR_EACH_OBSERVER(Observer, observers_, OnPolicyUpdated(user_id)); | 568 FOR_EACH_OBSERVER(Observer, observers_, OnPolicyUpdated(user_id)); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace policy | 571 } // namespace policy |
| OLD | NEW |