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

Unified Diff: chrome/installer/util/advanced_security_firewall_manager_win.h

Issue 149023010: UDP firewall rules for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more xp code Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/advanced_security_firewall_manager_win.h
diff --git a/chrome/installer/util/advanced_security_firewall_manager_win.h b/chrome/installer/util/advanced_security_firewall_manager_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..692d6bb73f53d535e36702702ceeeb76439f6bf3
--- /dev/null
+++ b/chrome/installer/util/advanced_security_firewall_manager_win.h
@@ -0,0 +1,45 @@
+// Copyright 2014 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.
+
+#ifndef CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_
+#define CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_
+
+#include <windows.h>
+#include <netfw.h>
+
+#include "base/basictypes.h"
+#include "base/files/file_path.h"
+#include "base/strings/string16.h"
+#include "base/win/scoped_comptr.h"
+#include "chrome/installer/util/firewall_manager.h"
+
+namespace installer {
+
+class AdvancedSecurityFirewallManager : public FirewallManager {
+ public:
+ AdvancedSecurityFirewallManager();
+ virtual ~AdvancedSecurityFirewallManager();
+
+ bool Init(BrowserDistribution* dist, const base::FilePath& chrome_path);
+
+ // FirewallManager methods.
+ virtual bool AddUDPFirewallRuleIfAbsent() OVERRIDE;
+ virtual void DeleteUDPFirewallRule() OVERRIDE;
+ virtual bool CanUseLocalUDPPort() OVERRIDE;
+
+ private:
+ base::string16 GetUDPRuleName();
+ base::string16 GetUDPRuleDescription();
+ base::win::ScopedComPtr<INetFwRule> CreateUDPRule();
+
+ BrowserDistribution* distribution_;
+ base::FilePath chrome_path_;
+ base::win::ScopedComPtr<INetFwPolicy2> firewall_policy_;
+
+ DISALLOW_COPY_AND_ASSIGN(AdvancedSecurityFirewallManager);
+};
+
+} // namespace installer
+
+#endif // CHROME_INSTALLER_UTIL_ADVANCED_SECURITY_FIREWALL_MANAGER_WIN_H_
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/advanced_security_firewall_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698