| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/policy/core/common/async_policy_provider.h" | 5 #include "components/policy/core/common/async_policy_provider.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "components/policy/core/common/async_policy_loader.h" | 15 #include "components/policy/core/common/async_policy_loader.h" |
| 16 #include "components/policy/core/common/policy_bundle.h" | 16 #include "components/policy/core/common/policy_bundle.h" |
| 17 #include "components/policy/core/common/schema_registry.h" | 17 #include "components/policy/core/common/schema_registry.h" |
| 18 | 18 |
| 19 namespace policy { | 19 namespace policy { |
| 20 | 20 |
| 21 AsyncPolicyProvider::AsyncPolicyProvider( | 21 AsyncPolicyProvider::AsyncPolicyProvider( |
| 22 SchemaRegistry* registry, | 22 SchemaRegistry* registry, |
| 23 std::unique_ptr<AsyncPolicyLoader> loader) | 23 std::unique_ptr<AsyncPolicyLoader> loader) |
| 24 : loader_(std::move(loader)), weak_factory_(this) { | 24 : loader_(std::move(loader)), weak_factory_(this) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 scoped_refptr<base::SingleThreadTaskRunner> runner, | 125 scoped_refptr<base::SingleThreadTaskRunner> runner, |
| 126 base::WeakPtr<AsyncPolicyProvider> weak_this, | 126 base::WeakPtr<AsyncPolicyProvider> weak_this, |
| 127 std::unique_ptr<PolicyBundle> bundle) { | 127 std::unique_ptr<PolicyBundle> bundle) { |
| 128 runner->PostTask(FROM_HERE, | 128 runner->PostTask(FROM_HERE, |
| 129 base::Bind(&AsyncPolicyProvider::OnLoaderReloaded, | 129 base::Bind(&AsyncPolicyProvider::OnLoaderReloaded, |
| 130 weak_this, | 130 weak_this, |
| 131 base::Passed(&bundle))); | 131 base::Passed(&bundle))); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace policy | 134 } // namespace policy |
| OLD | NEW |