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 29 matching lines...) Expand all Loading... |
40 #include "chrome/installer/util/helper.h" | 40 #include "chrome/installer/util/helper.h" |
41 #include "chrome/installer/util/install_util.h" | 41 #include "chrome/installer/util/install_util.h" |
42 #include "chrome/installer/util/installation_state.h" | 42 #include "chrome/installer/util/installation_state.h" |
43 #include "chrome/installer/util/installer_state.h" | 43 #include "chrome/installer/util/installer_state.h" |
44 #include "chrome/installer/util/l10n_string_util.h" | 44 #include "chrome/installer/util/l10n_string_util.h" |
45 #include "chrome/installer/util/product.h" | 45 #include "chrome/installer/util/product.h" |
46 #include "chrome/installer/util/set_reg_value_work_item.h" | 46 #include "chrome/installer/util/set_reg_value_work_item.h" |
47 #include "chrome/installer/util/shell_util.h" | 47 #include "chrome/installer/util/shell_util.h" |
48 #include "chrome/installer/util/util_constants.h" | 48 #include "chrome/installer/util/util_constants.h" |
49 #include "chrome/installer/util/work_item_list.h" | 49 #include "chrome/installer/util/work_item_list.h" |
50 | |
51 #if !defined(OMIT_CHROME_FRAME) | |
52 #include "chrome_frame/chrome_tab.h" | 50 #include "chrome_frame/chrome_tab.h" |
53 #endif | |
54 | 51 |
55 using base::win::RegKey; | 52 using base::win::RegKey; |
56 | 53 |
57 namespace installer { | 54 namespace installer { |
58 | 55 |
59 namespace { | 56 namespace { |
60 | 57 |
61 enum ElevationPolicyId { | 58 enum ElevationPolicyId { |
62 CURRENT_ELEVATION_POLICY, | 59 CURRENT_ELEVATION_POLICY, |
63 OLD_ELEVATION_POLICY, | 60 OLD_ELEVATION_POLICY, |
64 }; | 61 }; |
65 | 62 |
66 // The version identifying the work done by setup.exe --configure-user-settings | 63 // The version identifying the work done by setup.exe --configure-user-settings |
67 // on user login by way of Active Setup. Increase this value if the work done | 64 // on user login by way of Active Setup. Increase this value if the work done |
68 // in setup_main.cc's handling of kConfigureUserSettings changes and should be | 65 // in setup_main.cc's handling of kConfigureUserSettings changes and should be |
69 // executed again for all users. | 66 // executed again for all users. |
70 const wchar_t kActiveSetupVersion[] = L"24,0,0,0"; | 67 const wchar_t kActiveSetupVersion[] = L"24,0,0,0"; |
71 | 68 |
72 // Although the UUID of the ChromeFrame class is used for the "current" value, | 69 // Although the UUID of the ChromeFrame class is used for the "current" value, |
73 // this is done only as a convenience; there is no need for the GUID of the Low | 70 // this is done only as a convenience; there is no need for the GUID of the Low |
74 // Rights policies to match the ChromeFrame class's GUID. Hence, it is safe to | 71 // Rights policies to match the ChromeFrame class's GUID. Hence, it is safe to |
75 // use this completely unrelated GUID for the "old" policies. | 72 // use this completely unrelated GUID for the "old" policies. |
76 const wchar_t kIELowRightsPolicyOldGuid[] = | 73 const wchar_t kIELowRightsPolicyOldGuid[] = |
77 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; | 74 L"{6C288DD7-76FB-4721-B628-56FAC252E199}"; |
78 | 75 |
79 #if defined(OMIT_CHROME_FRAME) | |
80 // For historical reasons, this GUID is the same as CLSID_ChromeFrame. Included | |
81 // here to break the dependency on Chrome Frame when Chrome Frame is not being | |
82 // built. | |
83 // TODO(robertshield): Remove this when Chrome Frame works with Aura. | |
84 const wchar_t kIELowRightsPolicyCurrentGuid[] = | |
85 L"{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}"; | |
86 #endif | |
87 | |
88 const wchar_t kElevationPolicyKeyPath[] = | 76 const wchar_t kElevationPolicyKeyPath[] = |
89 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; | 77 L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\ElevationPolicy\\"; |
90 | 78 |
91 void GetIELowRightsElevationPolicyKeyPath(ElevationPolicyId policy, | 79 void GetIELowRightsElevationPolicyKeyPath(ElevationPolicyId policy, |
92 string16* key_path) { | 80 string16* key_path) { |
93 DCHECK(policy == CURRENT_ELEVATION_POLICY || policy == OLD_ELEVATION_POLICY); | 81 DCHECK(policy == CURRENT_ELEVATION_POLICY || policy == OLD_ELEVATION_POLICY); |
| 82 |
94 key_path->assign(kElevationPolicyKeyPath, | 83 key_path->assign(kElevationPolicyKeyPath, |
95 arraysize(kElevationPolicyKeyPath) - 1); | 84 arraysize(kElevationPolicyKeyPath) - 1); |
96 if (policy == CURRENT_ELEVATION_POLICY) { | 85 if (policy == CURRENT_ELEVATION_POLICY) { |
97 #if defined(OMIT_CHROME_FRAME) | |
98 key_path->append(kIELowRightsPolicyCurrentGuid, | |
99 arraysize(kIELowRightsPolicyCurrentGuid) - 1); | |
100 #else | |
101 wchar_t cf_clsid[64]; | 86 wchar_t cf_clsid[64]; |
102 int len = StringFromGUID2(__uuidof(ChromeFrame), &cf_clsid[0], | 87 int len = StringFromGUID2(__uuidof(ChromeFrame), &cf_clsid[0], |
103 arraysize(cf_clsid)); | 88 arraysize(cf_clsid)); |
104 key_path->append(&cf_clsid[0], len - 1); | 89 key_path->append(&cf_clsid[0], len - 1); |
105 #endif | |
106 } else { | 90 } else { |
107 key_path->append(kIELowRightsPolicyOldGuid, | 91 key_path->append(kIELowRightsPolicyOldGuid, |
108 arraysize(kIELowRightsPolicyOldGuid)- 1); | 92 arraysize(kIELowRightsPolicyOldGuid)- 1); |
109 } | 93 } |
110 } | 94 } |
111 | 95 |
112 // Local helper to call AddRegisterComDllWorkItems for all DLLs in a set of | 96 // Local helper to call AddRegisterComDllWorkItems for all DLLs in a set of |
113 // products managed by a given package. | 97 // products managed by a given package. |
114 // |old_version| can be NULL to indicate no Chrome is currently installed. | 98 // |old_version| can be NULL to indicate no Chrome is currently installed. |
115 void AddRegisterComDllWorkItemsForPackage(const InstallerState& installer_state, | 99 void AddRegisterComDllWorkItemsForPackage(const InstallerState& installer_state, |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 if (installer_state.system_install()) | 1681 if (installer_state.system_install()) |
1698 cmd_line.AppendSwitch(switches::kSystemLevel); | 1682 cmd_line.AppendSwitch(switches::kSystemLevel); |
1699 AppCommand cmd(cmd_line.GetCommandLineString()); | 1683 AppCommand cmd(cmd_line.GetCommandLineString()); |
1700 cmd.set_sends_pings(true); | 1684 cmd.set_sends_pings(true); |
1701 cmd.set_is_web_accessible(true); | 1685 cmd.set_is_web_accessible(true); |
1702 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); | 1686 cmd.AddWorkItems(installer_state.root_key(), cmd_key, work_item_list); |
1703 } | 1687 } |
1704 } | 1688 } |
1705 | 1689 |
1706 } // namespace installer | 1690 } // namespace installer |
OLD | NEW |