| Index: chrome/installer/util/legacy_firewall_manager_win.h
|
| diff --git a/chrome/installer/util/legacy_firewall_manager_win.h b/chrome/installer/util/legacy_firewall_manager_win.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..df30293c1880b4d8661441063d3352261dc6556c
|
| --- /dev/null
|
| +++ b/chrome/installer/util/legacy_firewall_manager_win.h
|
| @@ -0,0 +1,55 @@
|
| +// 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_LEGACY_FIREWALL_MANAGER_WIN_H_
|
| +#define CHROME_INSTALLER_UTIL_LEGACY_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 LegacyFirewallManager : public FirewallManager {
|
| + public:
|
| + LegacyFirewallManager();
|
| + virtual ~LegacyFirewallManager();
|
| +
|
| + bool Init(BrowserDistribution* dist, const base::FilePath& chrome_path);
|
| +
|
| + // FirewallManager methods.
|
| + virtual bool AddUDPFirewallRuleIfAbsent() OVERRIDE;
|
| + virtual void DeleteUDPFirewallRule() OVERRIDE;
|
| + virtual bool CanUseLocalUDPPort() OVERRIDE;
|
| +
|
| + private:
|
| + // Returns the local filewall policy's current profile or an empty pointer in
|
| + // case of error.
|
| + base::win::ScopedComPtr<INetFwProfile> GetCurrentProfile();
|
| +
|
| + // Returns the authorized applications collection for the local firewall
|
| + // policy's current profile or an empty pointer in case of error.
|
| + base::win::ScopedComPtr<INetFwAuthorizedApplications>
|
| + GetAuthorizedApplications();
|
| +
|
| + base::win::ScopedComPtr<INetFwAuthorizedApplication>
|
| + CreateChromeAuthorization();
|
| +
|
| + BrowserDistribution* distribution_;
|
| + base::FilePath chrome_path_;
|
| + base::win::ScopedComPtr<INetFwMgr> firewall_manager_;
|
| + base::win::ScopedComPtr<INetFwProfile> current_profile_;
|
| + base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(LegacyFirewallManager);
|
| +};
|
| +
|
| +} // namespace installer
|
| +
|
| +#endif // CHROME_INSTALLER_UTIL_LEGACY_FIREWALL_MANAGER_WIN_H_
|
|
|