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

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy_mac.cc

Issue 7599017: Framework to allow Chromoting host to respect NAT traversal policy in linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/host/plugin/policy_hack/nat_policy.h"
6
7 #include "base/compiler_specific.h"
8 #include "base/synchronization/waitable_event.h"
9
10 namespace remoting {
11 namespace policy_hack {
12
13 class NatPolicyMac : public NatPolicy {
14 public:
15 NatPolicyMac(const NatPolicy::NatEnabledCallback& nat_enabled_cb)
16 : nat_enabled_cb_(nat_enabled_cb) {
17 }
18
19 virtual ~NatPolicyMac() {
20 }
21
22 virtual void StartWatching() OVERRIDE {
23 nat_enabled_cb_.Run(false);
24 }
25
26 virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
27 done->Signal();
28 }
29
30 private:
31 NatEnabledCallback nat_enabled_cb_;
32 };
33
34 NatPolicy* NatPolicy::Create(MessageLoop* message_loop,
35 const NatEnabledCallback& nat_enabled_cb) {
36 return new NatPolicyMac(nat_enabled_cb);
37 }
38
39 } // namespace policy_hack
40 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698