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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
787 temp_path.value(), | 787 temp_path.value(), |
788 WorkItem::ALWAYS_MOVE); | 788 WorkItem::ALWAYS_MOVE); |
789 } else { | 789 } else { |
790 // We do not want to have an old VisualElementsManifest pointing to an old | 790 // We do not want to have an old VisualElementsManifest pointing to an old |
791 // version directory. Delete it as there wasn't a new one to replace it. | 791 // version directory. Delete it as there wasn't a new one to replace it. |
792 install_list->AddDeleteTreeWorkItem( | 792 install_list->AddDeleteTreeWorkItem( |
793 target_path.Append(installer::kVisualElementsManifest), | 793 target_path.Append(installer::kVisualElementsManifest), |
794 temp_path); | 794 temp_path); |
795 } | 795 } |
796 | 796 |
797 // For the component build to work with the installer, we need to drop a | |
gab
2012/05/09 01:34:20
It would be nice to #ifdef to code below to make s
grt (UTC plus 2)
2012/05/09 15:49:40
#if defined(COMPONENT_BUILD)
gab
2012/05/09 21:13:24
Done.
| |
798 // config file and a manifest by chrome.exe. These files are only found in | |
799 // the archive if this is a component build. | |
800 static const wchar_t kChromeExeConfig[] = L"chrome.exe.config"; | |
grt (UTC plus 2)
2012/05/09 15:49:40
this is the portable way to do literals that go in
gab
2012/05/09 21:13:24
Done.
| |
801 static const wchar_t kChromeExeManifest[] = L"chrome.exe.manifest"; | |
802 if (file_util::PathExists(src_path.Append(kChromeExeManifest))) { | |
803 install_list->AddMoveTreeWorkItem( | |
804 src_path.Append(kChromeExeConfig).value(), | |
grt (UTC plus 2)
2012/05/09 15:49:40
nit: indentation
gab
2012/05/09 21:13:24
Done.
| |
805 target_path.Append(kChromeExeConfig).value(), | |
806 temp_path.value(), | |
807 WorkItem::ALWAYS_MOVE); | |
808 install_list->AddMoveTreeWorkItem( | |
809 src_path.Append(kChromeExeManifest).value(), | |
grt (UTC plus 2)
2012/05/09 15:49:40
nit: indentation
gab
2012/05/09 21:13:24
Done.
| |
810 target_path.Append(kChromeExeManifest).value(), | |
811 temp_path.value(), | |
812 WorkItem::ALWAYS_MOVE); | |
813 } | |
814 | |
797 // In the past, we copied rather than moved for system level installs so that | 815 // In the past, we copied rather than moved for system level installs so that |
798 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| | 816 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| |
799 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% | 817 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% |
800 // otherwise), there is no need to do this. | 818 // otherwise), there is no need to do this. |
801 // Note that we pass true for check_duplicates to avoid failing on in-use | 819 // Note that we pass true for check_duplicates to avoid failing on in-use |
802 // repair runs if the current_version is the same as the new_version. | 820 // repair runs if the current_version is the same as the new_version. |
803 bool check_for_duplicates = | 821 bool check_for_duplicates = |
804 (current_version != NULL && current_version->get() != NULL && | 822 (current_version != NULL && current_version->get() != NULL && |
805 current_version->get()->Equals(new_version)); | 823 current_version->get()->Equals(new_version)); |
806 install_list->AddMoveTreeWorkItem( | 824 install_list->AddMoveTreeWorkItem( |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1405 } else { | 1423 } else { |
1406 DCHECK(operation == REMOVE_COMMAND); | 1424 DCHECK(operation == REMOVE_COMMAND); |
1407 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), | 1425 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), |
1408 cmd_key)->set_log_message( | 1426 cmd_key)->set_log_message( |
1409 "removing quick-enable-cf command"); | 1427 "removing quick-enable-cf command"); |
1410 } | 1428 } |
1411 } | 1429 } |
1412 } | 1430 } |
1413 | 1431 |
1414 } // namespace installer | 1432 } // namespace installer |
OLD | NEW |