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 14 matching lines...) Expand all Loading... |
25 #include "base/version.h" | 25 #include "base/version.h" |
26 #include "base/win/registry.h" | 26 #include "base/win/registry.h" |
27 #include "base/win/scoped_comptr.h" | 27 #include "base/win/scoped_comptr.h" |
28 #include "base/win/windows_version.h" | 28 #include "base/win/windows_version.h" |
29 #include "chrome/common/chrome_constants.h" | 29 #include "chrome/common/chrome_constants.h" |
30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
31 #include "chrome/installer/setup/app_launcher_installer.h" | 31 #include "chrome/installer/setup/app_launcher_installer.h" |
32 #include "chrome/installer/setup/install.h" | 32 #include "chrome/installer/setup/install.h" |
33 #include "chrome/installer/setup/setup_constants.h" | 33 #include "chrome/installer/setup/setup_constants.h" |
34 #include "chrome/installer/setup/setup_util.h" | 34 #include "chrome/installer/setup/setup_util.h" |
| 35 #include "chrome/installer/setup/update_active_setup_version_work_item.h" |
35 #include "chrome/installer/util/app_registration_data.h" | 36 #include "chrome/installer/util/app_registration_data.h" |
36 #include "chrome/installer/util/browser_distribution.h" | 37 #include "chrome/installer/util/browser_distribution.h" |
37 #include "chrome/installer/util/callback_work_item.h" | 38 #include "chrome/installer/util/callback_work_item.h" |
38 #include "chrome/installer/util/conditional_work_item_list.h" | 39 #include "chrome/installer/util/conditional_work_item_list.h" |
39 #include "chrome/installer/util/create_reg_key_work_item.h" | 40 #include "chrome/installer/util/create_reg_key_work_item.h" |
40 #include "chrome/installer/util/firewall_manager_win.h" | 41 #include "chrome/installer/util/firewall_manager_win.h" |
41 #include "chrome/installer/util/google_update_constants.h" | 42 #include "chrome/installer/util/google_update_constants.h" |
42 #include "chrome/installer/util/helper.h" | 43 #include "chrome/installer/util/helper.h" |
43 #include "chrome/installer/util/install_util.h" | 44 #include "chrome/installer/util/install_util.h" |
44 #include "chrome/installer/util/installation_state.h" | 45 #include "chrome/installer/util/installation_state.h" |
45 #include "chrome/installer/util/installer_state.h" | 46 #include "chrome/installer/util/installer_state.h" |
46 #include "chrome/installer/util/l10n_string_util.h" | 47 #include "chrome/installer/util/l10n_string_util.h" |
47 #include "chrome/installer/util/product.h" | 48 #include "chrome/installer/util/product.h" |
48 #include "chrome/installer/util/set_reg_value_work_item.h" | 49 #include "chrome/installer/util/set_reg_value_work_item.h" |
49 #include "chrome/installer/util/shell_util.h" | 50 #include "chrome/installer/util/shell_util.h" |
50 #include "chrome/installer/util/util_constants.h" | 51 #include "chrome/installer/util/util_constants.h" |
51 #include "chrome/installer/util/work_item_list.h" | 52 #include "chrome/installer/util/work_item_list.h" |
52 | 53 |
53 using base::ASCIIToUTF16; | 54 using base::ASCIIToUTF16; |
54 using base::win::RegKey; | 55 using base::win::RegKey; |
55 | 56 |
56 namespace installer { | 57 namespace installer { |
57 | 58 |
58 namespace { | 59 namespace { |
59 | 60 |
60 // The version identifying the work done by setup.exe --configure-user-settings | |
61 // on user login by way of Active Setup. Increase this value if the work done | |
62 // in setup_main.cc's handling of kConfigureUserSettings changes and should be | |
63 // executed again for all users. | |
64 const wchar_t kActiveSetupVersion[] = L"43,0,0,0"; | |
65 | |
66 // 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, |
67 // 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 |
68 // 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 |
69 // use this completely unrelated GUID for the "old" policies. | 64 // use this completely unrelated GUID for the "old" policies. |
70 const wchar_t kIELowRightsPolicyOldGuid[] = | 65 const wchar_t kIELowRightsPolicyOldGuid[] = |
71 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; | 66 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; |
72 | 67 |
73 const wchar_t kElevationPolicyKeyPath[] = | 68 const wchar_t kElevationPolicyKeyPath[] = |
74 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; | 69 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; |
75 | 70 |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 dist->GetDisplayName(), | 1445 dist->GetDisplayName(), |
1451 true); | 1446 true); |
1452 | 1447 |
1453 list->AddSetRegValueWorkItem(root, | 1448 list->AddSetRegValueWorkItem(root, |
1454 active_setup_path, | 1449 active_setup_path, |
1455 WorkItem::kWow64Default, | 1450 WorkItem::kWow64Default, |
1456 L"IsInstalled", | 1451 L"IsInstalled", |
1457 static_cast<DWORD>(1U), | 1452 static_cast<DWORD>(1U), |
1458 true); | 1453 true); |
1459 | 1454 |
1460 list->AddSetRegValueWorkItem(root, | 1455 list->AddWorkItem(new UpdateActiveSetupVersionWorkItem( |
1461 active_setup_path, | 1456 active_setup_path, UpdateActiveSetupVersionWorkItem::UPDATE)); |
1462 WorkItem::kWow64Default, | |
1463 L"Version", | |
1464 kActiveSetupVersion, | |
1465 true); | |
1466 } | 1457 } |
1467 | 1458 |
1468 void AddDeleteOldIELowRightsPolicyWorkItems( | 1459 void AddDeleteOldIELowRightsPolicyWorkItems( |
1469 const InstallerState& installer_state, | 1460 const InstallerState& installer_state, |
1470 WorkItemList* install_list) { | 1461 WorkItemList* install_list) { |
1471 DCHECK(install_list); | 1462 DCHECK(install_list); |
1472 | 1463 |
1473 base::string16 key_path; | 1464 base::string16 key_path; |
1474 GetOldIELowRightsElevationPolicyKeyPath(&key_path); | 1465 GetOldIELowRightsElevationPolicyKeyPath(&key_path); |
1475 install_list->AddDeleteRegKeyWorkItem( | 1466 install_list->AddDeleteRegKeyWorkItem( |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 // Unconditionally remove the legacy Quick Enable command from the binaries. | 1551 // Unconditionally remove the legacy Quick Enable command from the binaries. |
1561 // 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 |
1562 // not left behind in any case. | 1553 // not left behind in any case. |
1563 work_item_list->AddDeleteRegKeyWorkItem( | 1554 work_item_list->AddDeleteRegKeyWorkItem( |
1564 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) | 1555 installer_state.root_key(), cmd_key, KEY_WOW64_32KEY) |
1565 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + | 1556 ->set_log_message("removing " + base::UTF16ToASCII(kCmdQuickEnableCf) + |
1566 " command"); | 1557 " command"); |
1567 } | 1558 } |
1568 | 1559 |
1569 } // namespace installer | 1560 } // namespace installer |
OLD | NEW |