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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 policy_update_callback_.Run(); | 208 policy_update_callback_.Run(); |
209 } | 209 } |
210 | 210 |
211 void DeviceLocalAccountPolicyBroker::OnComponentCloudPolicyUpdated() { | 211 void DeviceLocalAccountPolicyBroker::OnComponentCloudPolicyUpdated() { |
212 policy_update_callback_.Run(); | 212 policy_update_callback_.Run(); |
213 } | 213 } |
214 | 214 |
215 void DeviceLocalAccountPolicyBroker::CreateComponentCloudPolicyService( | 215 void DeviceLocalAccountPolicyBroker::CreateComponentCloudPolicyService( |
216 const scoped_refptr<net::URLRequestContextGetter>& request_context, | 216 const scoped_refptr<net::URLRequestContextGetter>& request_context, |
217 CloudPolicyClient* client) { | 217 CloudPolicyClient* client) { |
218 if (CommandLine::ForCurrentProcess()->HasSwitch( | 218 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
219 switches::kDisableComponentCloudPolicy)) { | 219 switches::kDisableComponentCloudPolicy)) { |
220 // Disabled via the command line. | 220 // Disabled via the command line. |
221 return; | 221 return; |
222 } | 222 } |
223 | 223 |
224 scoped_ptr<ResourceCache> resource_cache( | 224 scoped_ptr<ResourceCache> resource_cache( |
225 new ResourceCache(component_policy_cache_path_, | 225 new ResourceCache(component_policy_cache_path_, |
226 content::BrowserThread::GetMessageLoopProxyForThread( | 226 content::BrowserThread::GetMessageLoopProxyForThread( |
227 content::BrowserThread::FILE))); | 227 content::BrowserThread::FILE))); |
228 | 228 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 } | 560 } |
561 return nullptr; | 561 return nullptr; |
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 |