| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 temp_path); | 358 temp_path); |
| 359 } | 359 } |
| 360 | 360 |
| 361 // In the past, we copied rather than moved for system level installs so that | 361 // In the past, we copied rather than moved for system level installs so that |
| 362 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| | 362 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| |
| 363 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% | 363 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% |
| 364 // otherwise), there is no need to do this. | 364 // otherwise), there is no need to do this. |
| 365 // Note that we pass true for check_duplicates to avoid failing on in-use | 365 // Note that we pass true for check_duplicates to avoid failing on in-use |
| 366 // repair runs if the current_version is the same as the new_version. | 366 // repair runs if the current_version is the same as the new_version. |
| 367 bool check_for_duplicates = (current_version && | 367 bool check_for_duplicates = (current_version && |
| 368 current_version->Equals(new_version)); | 368 *current_version == new_version); |
| 369 install_list->AddMoveTreeWorkItem( | 369 install_list->AddMoveTreeWorkItem( |
| 370 src_path.AppendASCII(new_version.GetString()).value(), | 370 src_path.AppendASCII(new_version.GetString()).value(), |
| 371 target_path.AppendASCII(new_version.GetString()).value(), | 371 target_path.AppendASCII(new_version.GetString()).value(), |
| 372 temp_path.value(), | 372 temp_path.value(), |
| 373 check_for_duplicates ? WorkItem::CHECK_DUPLICATES : | 373 check_for_duplicates ? WorkItem::CHECK_DUPLICATES : |
| 374 WorkItem::ALWAYS_MOVE); | 374 WorkItem::ALWAYS_MOVE); |
| 375 | 375 |
| 376 // Delete any old_chrome.exe if present (ignore failure if it's in use). | 376 // Delete any old_chrome.exe if present (ignore failure if it's in use). |
| 377 install_list->AddDeleteTreeWorkItem( | 377 install_list->AddDeleteTreeWorkItem( |
| 378 target_path.Append(installer::kChromeOldExe), temp_path)-> | 378 target_path.Append(installer::kChromeOldExe), temp_path)-> |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1354 // Unconditionally remove the legacy Quick Enable command from the binaries. |
| 1355 // Do this even if multi-install Chrome isn't installed to ensure that it is | 1355 // Do this even if multi-install Chrome isn't installed to ensure that it is |
| 1356 // not left behind in any case. | 1356 // not left behind in any case. |
| 1357 work_item_list->AddDeleteRegKeyWorkItem( | 1357 work_item_list->AddDeleteRegKeyWorkItem( |
| 1358 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) | 1358 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) |
| 1359 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + | 1359 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + |
| 1360 " command"); | 1360 " command"); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 } // namespace installer | 1363 } // namespace installer |
| OLD | NEW |