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

Side by Side Diff: chrome/installer/util/legacy_firewall_manager_win.cc

Issue 718253002: Remove implicit conversions from scoped_refptr to T* in chrome/installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/legacy_firewall_manager_win.h" 5 #include "chrome/installer/util/legacy_firewall_manager_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/win/scoped_bstr.h" 9 #include "base/win/scoped_bstr.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps( 76 base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps(
77 GetAuthorizedApplications()); 77 GetAuthorizedApplications());
78 if (!authorized_apps.get()) 78 if (!authorized_apps.get())
79 return false; 79 return false;
80 80
81 // Authorize chrome. 81 // Authorize chrome.
82 base::win::ScopedComPtr<INetFwAuthorizedApplication> authorization = 82 base::win::ScopedComPtr<INetFwAuthorizedApplication> authorization =
83 CreateChromeAuthorization(allow); 83 CreateChromeAuthorization(allow);
84 if (!authorization.get()) 84 if (!authorization.get())
85 return false; 85 return false;
86 HRESULT hr = authorized_apps->Add(authorization); 86 HRESULT hr = authorized_apps->Add(authorization.get());
87 DLOG_IF(ERROR, FAILED(hr)) << logging::SystemErrorCodeToString(hr); 87 DLOG_IF(ERROR, FAILED(hr)) << logging::SystemErrorCodeToString(hr);
88 return SUCCEEDED(hr); 88 return SUCCEEDED(hr);
89 } 89 }
90 90
91 void LegacyFirewallManager::DeleteRule() { 91 void LegacyFirewallManager::DeleteRule() {
92 base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps( 92 base::win::ScopedComPtr<INetFwAuthorizedApplications> authorized_apps(
93 GetAuthorizedApplications()); 93 GetAuthorizedApplications());
94 if (!authorized_apps.get()) 94 if (!authorized_apps.get())
95 return; 95 return;
96 authorized_apps->Remove(base::win::ScopedBstr(app_path_.value().c_str())); 96 authorized_apps->Remove(base::win::ScopedBstr(app_path_.value().c_str()));
(...skipping 28 matching lines...) Expand all
125 base::win::ScopedBstr(app_path_.value().c_str())); 125 base::win::ScopedBstr(app_path_.value().c_str()));
126 // IpVersion defaults to NET_FW_IP_VERSION_ANY. 126 // IpVersion defaults to NET_FW_IP_VERSION_ANY.
127 // Scope defaults to NET_FW_SCOPE_ALL. 127 // Scope defaults to NET_FW_SCOPE_ALL.
128 // RemoteAddresses defaults to "*". 128 // RemoteAddresses defaults to "*".
129 chrome_application->put_Enabled(allow ? VARIANT_TRUE : VARIANT_FALSE); 129 chrome_application->put_Enabled(allow ? VARIANT_TRUE : VARIANT_FALSE);
130 130
131 return chrome_application; 131 return chrome_application;
132 } 132 }
133 133
134 } // namespace installer 134 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/advanced_firewall_manager_win.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698