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

Unified Diff: remoting/host/policy_hack/nat_policy_linux.cc

Issue 10572005: Use SingleThreadTaskRunner instead of MessageLoopProxy in remoting/host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « remoting/host/policy_hack/nat_policy.cc ('k') | remoting/host/policy_hack/nat_policy_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/policy_hack/nat_policy_linux.cc
diff --git a/remoting/host/policy_hack/nat_policy_linux.cc b/remoting/host/policy_hack/nat_policy_linux.cc
index 534fdb401444eed17eedca8958d8f75ea3c030db..184d6fcd5ae0f9a04d1752fa759cf5219a3bfe7a 100644
--- a/remoting/host/policy_hack/nat_policy_linux.cc
+++ b/remoting/host/policy_hack/nat_policy_linux.cc
@@ -22,7 +22,7 @@
#include "base/json/json_file_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/time.h"
#include "base/values.h"
@@ -44,9 +44,9 @@ const int kSettleIntervalSeconds = 5;
class NatPolicyLinux : public NatPolicy {
public:
- NatPolicyLinux(base::MessageLoopProxy* message_loop_proxy,
+ NatPolicyLinux(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const FilePath& config_dir)
- : NatPolicy(message_loop_proxy),
+ : NatPolicy(task_runner),
config_dir_(config_dir),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
// Detach the factory because we ensure that only the policy thread ever
@@ -268,9 +268,10 @@ class NatPolicyLinux : public NatPolicy {
base::WeakPtrFactory<NatPolicyLinux> weak_factory_;
};
-NatPolicy* NatPolicy::Create(base::MessageLoopProxy* message_loop_proxy) {
+NatPolicy* NatPolicy::Create(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
FilePath policy_dir(kPolicyDir);
- return new NatPolicyLinux(message_loop_proxy, policy_dir);
+ return new NatPolicyLinux(task_runner, policy_dir);
}
} // namespace policy_hack
« no previous file with comments | « remoting/host/policy_hack/nat_policy.cc ('k') | remoting/host/policy_hack/nat_policy_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698