OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 #ifndef CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_ |
| 6 #define CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 #include <netfw.h> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/files/file_path.h" |
| 13 #include "base/strings/string16.h" |
| 14 #include "base/win/scoped_comptr.h" |
| 15 #include "chrome/installer/util/firewall_manager.h" |
| 16 |
| 17 namespace installer { |
| 18 |
| 19 class AdvancedSecurityFirewallManager : public FirewallManager { |
| 20 public: |
| 21 AdvancedSecurityFirewallManager(); |
| 22 virtual ~AdvancedSecurityFirewallManager(); |
| 23 |
| 24 bool Init(BrowserDistribution* dist, const base::FilePath& chrome_path); |
| 25 |
| 26 // FirewallManager methods. |
| 27 virtual bool AddUDPFirewallRuleIfAbsent() OVERRIDE; |
| 28 virtual void DeleteUDPFirewallRule() OVERRIDE; |
| 29 virtual bool CanUseLocalUDPPort() OVERRIDE; |
| 30 |
| 31 private: |
| 32 base::string16 GetUDPRuleName(); |
| 33 base::string16 GetUDPRuleDescription(); |
| 34 base::win::ScopedComPtr<INetFwRule> CreateUDPRule(); |
| 35 |
| 36 BrowserDistribution* distribution_; |
| 37 base::FilePath chrome_path_; |
| 38 base::win::ScopedComPtr<INetFwPolicy2> firewall_policy_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(AdvancedSecurityFirewallManager); |
| 41 }; |
| 42 |
| 43 } // namespace installer |
| 44 |
| 45 #endif // CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_ |
OLD | NEW |