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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, | 267 CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, |
268 &component_policy_cache_root_)); | 268 &component_policy_cache_root_)); |
269 external_data_service_.reset(new DeviceLocalAccountExternalDataService( | 269 external_data_service_.reset(new DeviceLocalAccountExternalDataService( |
270 this, | 270 this, |
271 external_data_service_backend_task_runner, | 271 external_data_service_backend_task_runner, |
272 io_task_runner)); | 272 io_task_runner)); |
273 UpdateAccountList(); | 273 UpdateAccountList(); |
274 } | 274 } |
275 | 275 |
276 DeviceLocalAccountPolicyService::~DeviceLocalAccountPolicyService() { | 276 DeviceLocalAccountPolicyService::~DeviceLocalAccountPolicyService() { |
277 DCHECK(!request_context_); | 277 DCHECK(!request_context_.get()); |
278 DCHECK(policy_brokers_.empty()); | 278 DCHECK(policy_brokers_.empty()); |
279 } | 279 } |
280 | 280 |
281 void DeviceLocalAccountPolicyService::Shutdown() { | 281 void DeviceLocalAccountPolicyService::Shutdown() { |
282 device_management_service_ = NULL; | 282 device_management_service_ = NULL; |
283 request_context_ = NULL; | 283 request_context_ = NULL; |
284 DeleteBrokers(&policy_brokers_); | 284 DeleteBrokers(&policy_brokers_); |
285 } | 285 } |
286 | 286 |
287 void DeviceLocalAccountPolicyService::Connect( | 287 void DeviceLocalAccountPolicyService::Connect( |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 } | 560 } |
561 return NULL; | 561 return NULL; |
562 } | 562 } |
563 | 563 |
564 void DeviceLocalAccountPolicyService::NotifyPolicyUpdated( | 564 void DeviceLocalAccountPolicyService::NotifyPolicyUpdated( |
565 const std::string& user_id) { | 565 const std::string& user_id) { |
566 FOR_EACH_OBSERVER(Observer, observers_, OnPolicyUpdated(user_id)); | 566 FOR_EACH_OBSERVER(Observer, observers_, OnPolicyUpdated(user_id)); |
567 } | 567 } |
568 | 568 |
569 } // namespace policy | 569 } // namespace policy |
OLD | NEW |