OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains the definitions of the installer functions that build | 5 // This file contains the definitions of the installer functions that build |
6 // the WorkItemList used to install the application. | 6 // the WorkItemList used to install the application. |
7 | 7 |
8 #include "chrome/installer/setup/install_worker.h" | 8 #include "chrome/installer/setup/install_worker.h" |
9 | 9 |
10 #include <oaidl.h> | 10 #include <oaidl.h> |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // are left in-place on rollback unless |remove_on_rollback| is true. This is | 262 // are left in-place on rollback unless |remove_on_rollback| is true. This is |
263 // the case for new installs only. Updates and overinstalls leave the rule | 263 // the case for new installs only. Updates and overinstalls leave the rule |
264 // in-place on rollback since a previous install of Chrome will be used in that | 264 // in-place on rollback since a previous install of Chrome will be used in that |
265 // case. | 265 // case. |
266 bool AddFirewallRulesCallback(bool system_level, | 266 bool AddFirewallRulesCallback(bool system_level, |
267 BrowserDistribution* dist, | 267 BrowserDistribution* dist, |
268 const base::FilePath& chrome_path, | 268 const base::FilePath& chrome_path, |
269 bool remove_on_rollback, | 269 bool remove_on_rollback, |
270 const CallbackWorkItem& work_item) { | 270 const CallbackWorkItem& work_item) { |
271 // There is no work to do on rollback if this is not a new install. | 271 // There is no work to do on rollback if this is not a new install. |
272 if (work_item.IsRollback() || !remove_on_rollback) | 272 if (work_item.IsRollback() && !remove_on_rollback) |
273 return true; | 273 return true; |
274 | 274 |
275 scoped_ptr<FirewallManager> manager = | 275 scoped_ptr<FirewallManager> manager = |
276 FirewallManager::Create(dist, chrome_path); | 276 FirewallManager::Create(dist, chrome_path); |
277 if (!manager) { | 277 if (!manager) { |
278 LOG(ERROR) << "Failed creating a FirewallManager. Continuing with install."; | 278 LOG(ERROR) << "Failed creating a FirewallManager. Continuing with install."; |
279 return true; | 279 return true; |
280 } | 280 } |
281 | 281 |
282 if (work_item.IsRollback()) { | 282 if (work_item.IsRollback()) { |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1653 // Unconditionally remove the legacy Quick Enable command from the binaries. |
1654 // Do this even if multi-install Chrome isn't installed to ensure that it is | 1654 // Do this even if multi-install Chrome isn't installed to ensure that it is |
1655 // not left behind in any case. | 1655 // not left behind in any case. |
1656 work_item_list->AddDeleteRegKeyWorkItem( | 1656 work_item_list->AddDeleteRegKeyWorkItem( |
1657 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) | 1657 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) |
1658 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + | 1658 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + |
1659 " command"); | 1659 " command"); |
1660 } | 1660 } |
1661 | 1661 |
1662 } // namespace installer | 1662 } // namespace installer |
OLD | NEW |