| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 const scoped_refptr<net::URLRequestContextGetter>& request_context, | 225 const scoped_refptr<net::URLRequestContextGetter>& request_context, |
| 226 CloudPolicyClient* client) { | 226 CloudPolicyClient* client) { |
| 227 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 227 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 228 switches::kDisableComponentCloudPolicy)) { | 228 switches::kDisableComponentCloudPolicy)) { |
| 229 // Disabled via the command line. | 229 // Disabled via the command line. |
| 230 return; | 230 return; |
| 231 } | 231 } |
| 232 | 232 |
| 233 std::unique_ptr<ResourceCache> resource_cache( | 233 std::unique_ptr<ResourceCache> resource_cache( |
| 234 new ResourceCache(component_policy_cache_path_, | 234 new ResourceCache(component_policy_cache_path_, |
| 235 content::BrowserThread::GetMessageLoopProxyForThread( | 235 content::BrowserThread::GetTaskRunnerForThread( |
| 236 content::BrowserThread::FILE))); | 236 content::BrowserThread::FILE))); |
| 237 | 237 |
| 238 component_policy_service_.reset(new ComponentCloudPolicyService( | 238 component_policy_service_.reset(new ComponentCloudPolicyService( |
| 239 this, &schema_registry_, core(), client, std::move(resource_cache), | 239 this, &schema_registry_, core(), client, std::move(resource_cache), |
| 240 request_context, content::BrowserThread::GetMessageLoopProxyForThread( | 240 request_context, content::BrowserThread::GetTaskRunnerForThread( |
| 241 content::BrowserThread::FILE), | 241 content::BrowserThread::FILE), |
| 242 content::BrowserThread::GetMessageLoopProxyForThread( | 242 content::BrowserThread::GetTaskRunnerForThread( |
| 243 content::BrowserThread::IO))); | 243 content::BrowserThread::IO))); |
| 244 } | 244 } |
| 245 | 245 |
| 246 DeviceLocalAccountPolicyService::DeviceLocalAccountPolicyService( | 246 DeviceLocalAccountPolicyService::DeviceLocalAccountPolicyService( |
| 247 chromeos::SessionManagerClient* session_manager_client, | 247 chromeos::SessionManagerClient* session_manager_client, |
| 248 chromeos::DeviceSettingsService* device_settings_service, | 248 chromeos::DeviceSettingsService* device_settings_service, |
| 249 chromeos::CrosSettings* cros_settings, | 249 chromeos::CrosSettings* cros_settings, |
| 250 AffiliatedInvalidationServiceProvider* invalidation_service_provider, | 250 AffiliatedInvalidationServiceProvider* invalidation_service_provider, |
| 251 scoped_refptr<base::SequencedTaskRunner> store_background_task_runner, | 251 scoped_refptr<base::SequencedTaskRunner> store_background_task_runner, |
| 252 scoped_refptr<base::SequencedTaskRunner> extension_cache_task_runner, | 252 scoped_refptr<base::SequencedTaskRunner> extension_cache_task_runner, |
| (...skipping 309 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 |