| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Most of this code is copied from: | 5 // Most of this code is copied from: |
| 6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc} | 6 // src/chrome/browser/policy/asynchronous_policy_loader.{h,cc} |
| 7 | 7 |
| 8 #include "remoting/host/policy_watcher.h" | 8 #include "remoting/host/policy_watcher.h" |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 file_task_runner, | 367 file_task_runner, |
| 368 policy::PolicyLoaderMac::GetManagedPolicyPath(bundle_id), | 368 policy::PolicyLoaderMac::GetManagedPolicyPath(bundle_id), |
| 369 new MacPreferences(), bundle_id)); | 369 new MacPreferences(), bundle_id)); |
| 370 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 370 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
| 371 policy_loader.reset(new policy::ConfigDirPolicyLoader( | 371 policy_loader.reset(new policy::ConfigDirPolicyLoader( |
| 372 file_task_runner, | 372 file_task_runner, |
| 373 base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")), | 373 base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")), |
| 374 policy::POLICY_SCOPE_MACHINE)); | 374 policy::POLICY_SCOPE_MACHINE)); |
| 375 #elif defined(OS_ANDROID) | 375 #elif defined(OS_ANDROID) |
| 376 NOTIMPLEMENTED(); | 376 NOTIMPLEMENTED(); |
| 377 policy::PolicyServiceImpl::Providers providers; | |
| 378 std::unique_ptr<policy::PolicyService> owned_policy_service( | |
| 379 new policy::PolicyServiceImpl(providers)); | |
| 380 return base::WrapUnique(new PolicyWatcher( | |
| 381 owned_policy_service.get(), std::move(owned_policy_service), nullptr, | |
| 382 CreateSchemaRegistry())); | |
| 383 #else | 377 #else |
| 384 #error OS that is not yet supported by PolicyWatcher code. | 378 #error OS that is not yet supported by PolicyWatcher code. |
| 385 #endif | 379 #endif |
| 386 | 380 |
| 387 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader)); | 381 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader)); |
| 388 #endif // !(OS_CHROMEOS) | 382 #endif // !(OS_CHROMEOS) |
| 389 } | 383 } |
| 390 | 384 |
| 391 } // namespace remoting | 385 } // namespace remoting |
| OLD | NEW |