Index: chrome/installer/util/advanced_firewall_manager_win.cc |
diff --git a/chrome/installer/util/advanced_firewall_manager_win.cc b/chrome/installer/util/advanced_firewall_manager_win.cc |
index 52a72180a84694aa17fc42b51116bd8bf1da8de1..1d94dd2f4d7f2cdd030c09bcc536c8688d3b8254 100644 |
--- a/chrome/installer/util/advanced_firewall_manager_win.cc |
+++ b/chrome/installer/util/advanced_firewall_manager_win.cc |
@@ -24,7 +24,8 @@ AdvancedFirewallManager::~AdvancedFirewallManager() {} |
bool AdvancedFirewallManager::Init(const base::string16& app_name, |
const base::FilePath& app_path) { |
firewall_rules_ = NULL; |
- HRESULT hr = firewall_policy_.CreateInstance(CLSID_NetFwPolicy2); |
+ HRESULT hr = ::CoCreateInstance(CLSID_NetFwPolicy2, nullptr, CLSCTX_ALL, |
+ IID_PPV_ARGS(&firewall_policy_)); |
if (FAILED(hr)) { |
DLOG(ERROR) << logging::SystemErrorCodeToString(hr); |
firewall_policy_ = NULL; |
@@ -127,7 +128,8 @@ base::win::ScopedComPtr<INetFwRule> AdvancedFirewallManager::CreateUDPRule( |
uint16_t port) { |
base::win::ScopedComPtr<INetFwRule> udp_rule; |
- HRESULT hr = udp_rule.CreateInstance(CLSID_NetFwRule); |
+ HRESULT hr = ::CoCreateInstance(CLSID_NetFwRule, nullptr, CLSCTX_ALL, |
+ IID_PPV_ARGS(&udp_rule)); |
if (FAILED(hr)) { |
DLOG(ERROR) << logging::SystemErrorCodeToString(hr); |
return base::win::ScopedComPtr<INetFwRule>(); |