| 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 temp_path.value(), | 527 temp_path.value(), |
| 528 WorkItem::ALWAYS_MOVE); | 528 WorkItem::ALWAYS_MOVE); |
| 529 } else { | 529 } else { |
| 530 // We do not want to have an old VisualElementsManifest pointing to an old | 530 // We do not want to have an old VisualElementsManifest pointing to an old |
| 531 // version directory. Delete it as there wasn't a new one to replace it. | 531 // version directory. Delete it as there wasn't a new one to replace it. |
| 532 install_list->AddDeleteTreeWorkItem( | 532 install_list->AddDeleteTreeWorkItem( |
| 533 target_path.Append(installer::kVisualElementsManifest), | 533 target_path.Append(installer::kVisualElementsManifest), |
| 534 temp_path); | 534 temp_path); |
| 535 } | 535 } |
| 536 | 536 |
| 537 // For the component build to work with the installer, we need to drop a | 537 // For the component build to work with the installer, we need to also drop |
| 538 // config file and a manifest by chrome.exe. These files are only found in | 538 // chrome.exe.manifest (other manifests are already contained in the version |
| 539 // the archive if this is a component build. | 539 // directory in the archive so no explicit work is required for them). |
| 540 #if defined(COMPONENT_BUILD) | 540 #if defined(COMPONENT_BUILD) |
| 541 static const base::FilePath::CharType kChromeExeConfig[] = | |
| 542 FILE_PATH_LITERAL("chrome.exe.config"); | |
| 543 static const base::FilePath::CharType kChromeExeManifest[] = | 541 static const base::FilePath::CharType kChromeExeManifest[] = |
| 544 FILE_PATH_LITERAL("chrome.exe.manifest"); | 542 FILE_PATH_LITERAL("chrome.exe.manifest"); |
| 545 install_list->AddMoveTreeWorkItem( | 543 install_list->AddMoveTreeWorkItem( |
| 546 src_path.Append(kChromeExeConfig).value(), | |
| 547 target_path.Append(kChromeExeConfig).value(), | |
| 548 temp_path.value(), | |
| 549 WorkItem::ALWAYS_MOVE); | |
| 550 install_list->AddMoveTreeWorkItem( | |
| 551 src_path.Append(kChromeExeManifest).value(), | 544 src_path.Append(kChromeExeManifest).value(), |
| 552 target_path.Append(kChromeExeManifest).value(), | 545 target_path.Append(kChromeExeManifest).value(), |
| 553 temp_path.value(), | 546 temp_path.value(), |
| 554 WorkItem::ALWAYS_MOVE); | 547 WorkItem::ALWAYS_MOVE); |
| 555 #endif // defined(COMPONENT_BUILD) | 548 #endif // defined(COMPONENT_BUILD) |
| 556 | 549 |
| 557 // In the past, we copied rather than moved for system level installs so that | 550 // In the past, we copied rather than moved for system level installs so that |
| 558 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| | 551 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| |
| 559 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% | 552 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% |
| 560 // otherwise), there is no need to do this. | 553 // otherwise), there is no need to do this. |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 if (installer_state.system_install()) | 1705 if (installer_state.system_install()) |
| 1713 cmd_line.AppendSwitch(switches::kSystemLevel); | 1706 cmd_line.AppendSwitch(switches::kSystemLevel); |
| 1714 AppCommand cmd(cmd_line.GetCommandLineString()); | 1707 AppCommand cmd(cmd_line.GetCommandLineString()); |
| 1715 cmd.set_sends_pings(true); | 1708 cmd.set_sends_pings(true); |
| 1716 cmd.set_is_web_accessible(true); | 1709 cmd.set_is_web_accessible(true); |
| 1717 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); | 1710 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); |
| 1718 } | 1711 } |
| 1719 } | 1712 } |
| 1720 | 1713 |
| 1721 } // namespace installer | 1714 } // namespace installer |
| OLD | NEW |