| Index: remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| diff --git a/remoting/host/plugin/policy_hack/nat_policy_win.cc b/remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e62c96c02b01a8c3fb47f5eef601255ca1f343d9
|
| --- /dev/null
|
| +++ b/remoting/host/plugin/policy_hack/nat_policy_win.cc
|
| @@ -0,0 +1,38 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/synchronization/waitable_event.h"
|
| +#include "remoting/host/plugin/policy_hack/nat_policy.h"
|
| +
|
| +namespace remoting {
|
| +namespace policy_hack {
|
| +
|
| +class NatPolicyWin : public NatPolicy {
|
| + public:
|
| + NatPolicyWin(const NatPolicy::NatEnabledCallback& nat_enabled_cb) {
|
| + : nat_enabled_cb_(nat_enabled_cb) {
|
| + }
|
| +
|
| + virtual ~NatPolicyWin() {
|
| + }
|
| +
|
| + virtual void StartWatching() OVERRIDE {
|
| + nat_enabled_cb_.Run(false);
|
| + }
|
| +
|
| + virtual void StopWatching(base::WaitableEvent* done) OVERRIDE {
|
| + done->Signal();
|
| + }
|
| +
|
| + private:
|
| + NatEnabledCallback nat_enabled_cb_;
|
| +};
|
| +
|
| +NatPolicy* NatPolicy::Create(MessageLoop* message_loop,
|
| + const NatEnabledCallback& nat_enabled_cb) {
|
| + return new NatPolicyWin(nat_enabled_cb);
|
| +}
|
| +
|
| +} // namespace policy_hack
|
| +} // namespace remoting
|
|
|