Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1726)

Unified Diff: components/policy/core/common/async_policy_provider.cc

Issue 1130753002: [components/policy] Use ThreadTaskRunnerHandle instead of LoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/async_policy_provider.cc
diff --git a/components/policy/core/common/async_policy_provider.cc b/components/policy/core/common/async_policy_provider.cc
index 94c35c562074a1e67538f028403bddefecabc819..ae08b209efb78d754da5910356821d7513d00c43 100644
--- a/components/policy/core/common/async_policy_provider.cc
+++ b/components/policy/core/common/async_policy_provider.cc
@@ -7,9 +7,9 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
-#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "components/policy/core/common/async_policy_loader.h"
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/schema_registry.h"
@@ -38,7 +38,7 @@ void AsyncPolicyProvider::Init(SchemaRegistry* registry) {
AsyncPolicyLoader::UpdateCallback callback =
base::Bind(&AsyncPolicyProvider::LoaderUpdateCallback,
- base::MessageLoopProxy::current(),
+ base::ThreadTaskRunnerHandle::Get(),
weak_factory_.GetWeakPtr());
bool post = loader_->task_runner()->PostTask(
FROM_HERE,
@@ -120,10 +120,10 @@ void AsyncPolicyProvider::OnLoaderReloaded(scoped_ptr<PolicyBundle> bundle) {
// static
void AsyncPolicyProvider::LoaderUpdateCallback(
- scoped_refptr<base::MessageLoopProxy> loop,
+ scoped_refptr<base::SingleThreadTaskRunner> runner,
base::WeakPtr<AsyncPolicyProvider> weak_this,
scoped_ptr<PolicyBundle> bundle) {
- loop->PostTask(FROM_HERE,
+ runner->PostTask(FROM_HERE,
base::Bind(&AsyncPolicyProvider::OnLoaderReloaded,
weak_this,
base::Passed(&bundle)));
« no previous file with comments | « components/policy/core/common/async_policy_provider.h ('k') | components/policy/core/common/cloud/cloud_policy_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698