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

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: 1-char comment typo 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/compiler_specific.h"
6 #include "base/synchronization/waitable_event.h"
7 #include "remoting/host/plugin/policy_hack/nat_policy.h"
dmac 2011/08/11 18:42:55 should this include be first? (same for other pla
awong 2011/08/11 19:04:07 Done.
8
9 namespace remoting {
10 namespace policy_hack {
11
12 class NatPolicyWin : public NatPolicy {
13 public:
14 NatPolicyWin(const NatPolicy::NatEnabledCallback& nat_enabled_cb)
15 : nat_enabled_cb_(nat_enabled_cb) {
16 }
17
18 virtual ~NatPolicyWin() {
19 }
20
21 virtual void StartWatching() OVERRIDE {
22 nat_enabled_cb_.Run(false);
23 }
24
25 virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
26 done->Signal();
27 }
28
29 private:
30 NatEnabledCallback nat_enabled_cb_;
31 };
32
33 NatPolicy* NatPolicy::Create(MessageLoop* message_loop,
34 const NatEnabledCallback& nat_enabled_cb) {
35 return new NatPolicyWin(nat_enabled_cb);
36 }
37
38 } // namespace policy_hack
39 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698