| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 scoped_ptr<DeviceLocalAccountPolicyStore> store, | 122 scoped_ptr<DeviceLocalAccountPolicyStore> store, |
| 123 scoped_refptr<DeviceLocalAccountExternalDataManager> external_data_manager, | 123 scoped_refptr<DeviceLocalAccountExternalDataManager> external_data_manager, |
| 124 const base::Closure& policy_update_callback, | 124 const base::Closure& policy_update_callback, |
| 125 const scoped_refptr<base::SequencedTaskRunner>& task_runner) | 125 const scoped_refptr<base::SequencedTaskRunner>& task_runner) |
| 126 : account_id_(account.account_id), | 126 : account_id_(account.account_id), |
| 127 user_id_(account.user_id), | 127 user_id_(account.user_id), |
| 128 component_policy_cache_path_(component_policy_cache_path), | 128 component_policy_cache_path_(component_policy_cache_path), |
| 129 store_(store.Pass()), | 129 store_(store.Pass()), |
| 130 extension_tracker_(account, store_.get(), &schema_registry_), | 130 extension_tracker_(account, store_.get(), &schema_registry_), |
| 131 external_data_manager_(external_data_manager), | 131 external_data_manager_(external_data_manager), |
| 132 core_(PolicyNamespaceKey(dm_protocol::kChromePublicAccountPolicyType, | 132 core_(dm_protocol::kChromePublicAccountPolicyType, |
| 133 store_->account_id()), | 133 store_->account_id(), |
| 134 store_.get(), | 134 store_.get(), |
| 135 task_runner), | 135 task_runner), |
| 136 policy_update_callback_(policy_update_callback) { | 136 policy_update_callback_(policy_update_callback) { |
| 137 base::FilePath cache_root_dir; | 137 base::FilePath cache_root_dir; |
| 138 CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, | 138 CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, |
| 139 &cache_root_dir)); | 139 &cache_root_dir)); |
| 140 extension_loader_ = new chromeos::DeviceLocalAccountExternalPolicyLoader( | 140 extension_loader_ = new chromeos::DeviceLocalAccountExternalPolicyLoader( |
| 141 store_.get(), | 141 store_.get(), |
| 142 cache_root_dir.Append( | 142 cache_root_dir.Append( |
| 143 GetCacheSubdirectoryForAccountID(account.account_id))); | 143 GetCacheSubdirectoryForAccountID(account.account_id))); |
| (...skipping 416 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 |