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

Side by Side Diff: chrome/installer/util/legacy_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_LEGACY_FIREWALL_MANAGER_WIN_H_
6 #define CHROME_INSTALLER_UTIL_LEGACY_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 LegacyFirewallManager : public FirewallManager {
20 public:
21 LegacyFirewallManager();
22 virtual ~LegacyFirewallManager();
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 // Returns the local filewall policy's current profile or an empty pointer in
33 // case of error.
34 base::win::ScopedComPtr<INetFwProfile> GetCurrentProfile();
35
36 // Returns the authorized applications collection for the local firewall
37 // policy's current profile or an empty pointer in case of error.
38 base::win::ScopedComPtr<INetFwAuthorizedApplications>
39 GetAuthorizedApplications();
40
41 base::win::ScopedComPtr<INetFwAuthorizedApplication>
42 CreateChromeAuthorization();
43
44 BrowserDistribution* distribution_;
45 base::FilePath chrome_path_;
46 base::win::ScopedComPtr<INetFwMgr> firewall_manager_;
47 base::win::ScopedComPtr<INetFwProfile> current_profile_;
48 base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps_;
49
50 DISALLOW_COPY_AND_ASSIGN(LegacyFirewallManager);
51 };
52
53 } // namespace installer
54
55 #endif // CHROME_INSTALLER_UTIL_LEGACY_FIREWALL_MANAGER_WIN_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/firewall_manager_win.cc ('k') | chrome/installer/util/legacy_firewall_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698