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

Unified Diff: remoting/host/policy_hack/nat_policy.h

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
Index: remoting/host/policy_hack/nat_policy.h
diff --git a/remoting/host/policy_hack/nat_policy.h b/remoting/host/policy_hack/nat_policy.h
index 4984d1f5fbaa6b38cdf819f9f7d9816afe1814ad..93f1c41c6eb56b7f0aca65f2135ddb0519a3d1b3 100644
--- a/remoting/host/policy_hack/nat_policy.h
+++ b/remoting/host/policy_hack/nat_policy.h
@@ -10,7 +10,7 @@
namespace base {
class DictionaryValue;
-class MessageLoopProxy;
+class SingleThreadTaskRunner;
class TimeDelta;
class WaitableEvent;
} // namespace base
@@ -26,7 +26,7 @@ class NatPolicy {
// Called with the current status of whether or not NAT traversal is enabled.
typedef base::Callback<void(bool)> NatEnabledCallback;
- explicit NatPolicy(base::MessageLoopProxy* message_loop_proxy);
+ explicit NatPolicy(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
virtual ~NatPolicy();
// This guarantees that the |nat_enabled_cb| is called at least once with
@@ -40,7 +40,8 @@ class NatPolicy {
// Implemented by each platform. This message loop should be an IO message
// loop.
- static NatPolicy* Create(base::MessageLoopProxy* message_loop_proxy);
+ static NatPolicy* Create(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner);
protected:
virtual void StartWatchingInternal() = 0;
@@ -62,7 +63,7 @@ class NatPolicy {
static const char kNatPolicyName[];
private:
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
NatEnabledCallback nat_enabled_cb_;
bool current_nat_enabled_state_;

Powered by Google App Engine
This is Rietveld 408576698