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

Side by Side Diff: remoting/host/plugin/policy_hack/nat_policy_win.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: cleaned up threading. address dave's comments. 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 "base/synchronization/waitable_event.h"
6 #include "remoting/host/plugin/policy_hack/nat_policy.h"
7
8 namespace remoting {
9 namespace policy_hack {
10
11 class NatPolicyWin : public NatPolicy {
12 public:
13 NatPolicyWin(const NatPolicy::NatEnabledCallback& nat_enabled_cb) {
14 : nat_enabled_cb_(nat_enabled_cb) {
15 }
16
17 virtual ~NatPolicyWin() {
18 }
19
20 virtual void StartWatching() OVERRIDE {
21 nat_enabled_cb_.Run(false);
22 }
23
24 virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
25 done->Signal();
26 }
27
28 private:
29 NatEnabledCallback nat_enabled_cb_;
30 };
31
32 NatPolicy* NatPolicy::Create(MessageLoop* message_loop,
33 const NatEnabledCallback& nat_enabled_cb) {
34 return new NatPolicyWin(nat_enabled_cb);
35 }
36
37 } // namespace policy_hack
38 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698