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

Unified Diff: chrome/installer/util/firewall_manager_win.cc

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
« no previous file with comments | « chrome/installer/util/firewall_manager.cc ('k') | chrome/installer/util/legacy_firewall_manager_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/firewall_manager_win.cc
diff --git a/chrome/installer/util/firewall_manager_win.cc b/chrome/installer/util/firewall_manager_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..50acf8073b3deabffb4af630ad29827e6ffe77bd
--- /dev/null
+++ b/chrome/installer/util/firewall_manager_win.cc
@@ -0,0 +1,30 @@
+// 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.
+
+#include "chrome/installer/util/firewall_manager.h"
+
+#include "chrome/installer/util/advanced_security_firewall_manager_win.h"
+#include "chrome/installer/util/legacy_firewall_manager_win.h"
+
+namespace installer {
+
+// static
+scoped_ptr<FirewallManager> FirewallManager::Create(
+ BrowserDistribution* dist,
+ const base::FilePath& chrome_path) {
+ // First try to connect to "Windows Firewall with Advanced Security" (Vista+).
+ scoped_ptr<AdvancedSecurityFirewallManager> manager(
+ new AdvancedSecurityFirewallManager());
+ if (manager->Init(dist, chrome_path))
+ return manager.PassAs<FirewallManager>();
+
+ // Next try to connect to "Windows Firewall for Windows XP with SP2".
+ scoped_ptr<LegacyFirewallManager> legacy_manager(new LegacyFirewallManager());
+ if (legacy_manager->Init(dist, chrome_path))
+ return legacy_manager.PassAs<FirewallManager>();
+
+ return scoped_ptr<FirewallManager>();
+}
+
+} // namespace installer
« no previous file with comments | « chrome/installer/util/firewall_manager.cc ('k') | chrome/installer/util/legacy_firewall_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698