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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 owned_policy_service.get(), std::move(owned_policy_service), nullptr, | 383 owned_policy_service.get(), std::move(owned_policy_service), nullptr, |
384 CreateSchemaRegistry())); | 384 CreateSchemaRegistry())); |
385 #else | 385 #else |
386 #error OS that is not yet supported by PolicyWatcher code. | 386 #error OS that is not yet supported by PolicyWatcher code. |
387 #endif | 387 #endif |
388 | 388 |
389 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader)); | 389 return PolicyWatcher::CreateFromPolicyLoader(std::move(policy_loader)); |
390 #endif // !(OS_CHROMEOS) | 390 #endif // !(OS_CHROMEOS) |
391 } | 391 } |
392 | 392 |
| 393 std::unique_ptr<PolicyWatcher> PolicyWatcher::CreateFromPolicyLoaderForTesting( |
| 394 std::unique_ptr<policy::AsyncPolicyLoader> async_policy_loader) { |
| 395 return CreateFromPolicyLoader(std::move(async_policy_loader)); |
| 396 } |
| 397 |
393 } // namespace remoting | 398 } // namespace remoting |
OLD | NEW |