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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "chrome/installer/util/util_constants.h" | 51 #include "chrome/installer/util/util_constants.h" |
52 #include "chrome/installer/util/work_item_list.h" | 52 #include "chrome/installer/util/work_item_list.h" |
53 | 53 |
54 using base::ASCIIToUTF16; | 54 using base::ASCIIToUTF16; |
55 using base::win::RegKey; | 55 using base::win::RegKey; |
56 | 56 |
57 namespace installer { | 57 namespace installer { |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 // The version identifying the work done by setup.exe --configure-user-settings | |
62 // on user login by way of Active Setup. Increase this value if the work done | |
63 // in setup_main.cc's handling of kConfigureUserSettings changes and should be | |
64 // executed again for all users. | |
65 const wchar_t kActiveSetupVersion[] = L"43,0,0,0"; | |
66 | |
67 // Although the UUID of the ChromeFrame class is used for the "current" value, | 61 // Although the UUID of the ChromeFrame class is used for the "current" value, |
68 // this is done only as a convenience; there is no need for the GUID of the Low | 62 // this is done only as a convenience; there is no need for the GUID of the Low |
69 // Rights policies to match the ChromeFrame class's GUID. Hence, it is safe to | 63 // Rights policies to match the ChromeFrame class's GUID. Hence, it is safe to |
70 // use this completely unrelated GUID for the "old" policies. | 64 // use this completely unrelated GUID for the "old" policies. |
71 const wchar_t kIELowRightsPolicyOldGuid[] = | 65 const wchar_t kIELowRightsPolicyOldGuid[] = |
72 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; | 66 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; |
73 | 67 |
74 const wchar_t kElevationPolicyKeyPath[] = | 68 const wchar_t kElevationPolicyKeyPath[] = |
75 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; | 69 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; |
76 | 70 |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 dist->GetDisplayName(), | 1445 dist->GetDisplayName(), |
1452 true); | 1446 true); |
1453 | 1447 |
1454 list->AddSetRegValueWorkItem(root, | 1448 list->AddSetRegValueWorkItem(root, |
1455 active_setup_path, | 1449 active_setup_path, |
1456 WorkItem::kWow64Default, | 1450 WorkItem::kWow64Default, |
1457 L"IsInstalled", | 1451 L"IsInstalled", |
1458 static_cast<DWORD>(1U), | 1452 static_cast<DWORD>(1U), |
1459 true); | 1453 true); |
1460 | 1454 |
1461 list->AddSetRegValueWorkItem(root, | 1455 list->AddWorkItem(new UpdateActiveSetupVersionWorkItem( |
1462 active_setup_path, | 1456 active_setup_path, UpdateActiveSetupVersionWorkItem::UPDATE)); |
1463 WorkItem::kWow64Default, | |
1464 L"Version", | |
1465 kActiveSetupVersion, | |
1466 true); | |
1467 } | 1457 } |
1468 | 1458 |
1469 void AddDeleteOldIELowRightsPolicyWorkItems( | 1459 void AddDeleteOldIELowRightsPolicyWorkItems( |
1470 const InstallerState& installer_state, | 1460 const InstallerState& installer_state, |
1471 WorkItemList* install_list) { | 1461 WorkItemList* install_list) { |
1472 DCHECK(install_list); | 1462 DCHECK(install_list); |
1473 | 1463 |
1474 base::string16 key_path; | 1464 base::string16 key_path; |
1475 GetOldIELowRightsElevationPolicyKeyPath(&key_path); | 1465 GetOldIELowRightsElevationPolicyKeyPath(&key_path); |
1476 install_list->AddDeleteRegKeyWorkItem( | 1466 install_list->AddDeleteRegKeyWorkItem( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1561 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1551 // Unconditionally remove the legacy Quick Enable command from the binaries. |
1562 // Do this even if multi-install Chrome isn't installed to ensure that it is | 1552 // Do this even if multi-install Chrome isn't installed to ensure that it is |
1563 // not left behind in any case. | 1553 // not left behind in any case. |
1564 work_item_list->AddDeleteRegKeyWorkItem( | 1554 work_item_list->AddDeleteRegKeyWorkItem( |
1565 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) | 1555 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) |
1566 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + | 1556 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + |
1567 " command"); | 1557 " command"); |
1568 } | 1558 } |
1569 | 1559 |
1570 } // namespace installer | 1560 } // namespace installer |
OLD | NEW |