OLD | NEW |
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/firewall_manager_win.h" | 5 #include "chrome/installer/util/firewall_manager_win.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "chrome/installer/util/advanced_firewall_manager_win.h" | 9 #include "chrome/installer/util/advanced_firewall_manager_win.h" |
10 #include "chrome/installer/util/browser_distribution.h" | 10 #include "chrome/installer/util/browser_distribution.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 FirewallManager::~FirewallManager() {} | 99 FirewallManager::~FirewallManager() {} |
100 | 100 |
101 // static | 101 // static |
102 scoped_ptr<FirewallManager> FirewallManager::Create( | 102 scoped_ptr<FirewallManager> FirewallManager::Create( |
103 BrowserDistribution* dist, | 103 BrowserDistribution* dist, |
104 const base::FilePath& chrome_path) { | 104 const base::FilePath& chrome_path) { |
105 // First try to connect to "Windows Firewall with Advanced Security" (Vista+). | 105 // First try to connect to "Windows Firewall with Advanced Security" (Vista+). |
106 scoped_ptr<FirewallManagerAdvancedImpl> manager( | 106 scoped_ptr<FirewallManagerAdvancedImpl> manager( |
107 new FirewallManagerAdvancedImpl()); | 107 new FirewallManagerAdvancedImpl()); |
108 if (manager->Init(dist->GetDisplayName(), chrome_path)) | 108 if (manager->Init(dist->GetDisplayName(), chrome_path)) |
109 return manager.PassAs<FirewallManager>(); | 109 return manager.Pass(); |
110 | 110 |
111 // Next try to connect to "Windows Firewall for Windows XP with SP2". | 111 // Next try to connect to "Windows Firewall for Windows XP with SP2". |
112 scoped_ptr<FirewallManagerLegacyImpl> legacy_manager( | 112 scoped_ptr<FirewallManagerLegacyImpl> legacy_manager( |
113 new FirewallManagerLegacyImpl()); | 113 new FirewallManagerLegacyImpl()); |
114 if (legacy_manager->Init(dist->GetDisplayName(), chrome_path)) | 114 if (legacy_manager->Init(dist->GetDisplayName(), chrome_path)) |
115 return legacy_manager.PassAs<FirewallManager>(); | 115 return legacy_manager.Pass(); |
116 | 116 |
117 return scoped_ptr<FirewallManager>(); | 117 return scoped_ptr<FirewallManager>(); |
118 } | 118 } |
119 | 119 |
120 FirewallManager::FirewallManager() { | 120 FirewallManager::FirewallManager() { |
121 } | 121 } |
122 | 122 |
123 } // namespace installer | 123 } // namespace installer |
OLD | NEW |