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 // mini_installer.exe is the first exe that is run when chrome is being | 5 // mini_installer.exe is the first exe that is run when chrome is being |
6 // installed or upgraded. It is designed to be extremely small (~5KB with no | 6 // installed or upgraded. It is designed to be extremely small (~5KB with no |
7 // extra resources linked) and it has two main jobs: | 7 // extra resources linked) and it has two main jobs: |
8 // 1) unpack the resources (possibly decompressing some) | 8 // 1) unpack the resources (possibly decompressing some) |
9 // 2) run the real installer (setup.exe) with appropriate flags. | 9 // 2) run the real installer (setup.exe) with appropriate flags. |
10 // | 10 // |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 RegKey key; | 162 RegKey key; |
163 const REGSAM key_access = KEY_QUERY_VALUE | KEY_SET_VALUE; | 163 const REGSAM key_access = KEY_QUERY_VALUE | KEY_SET_VALUE; |
164 const HKEY root_key = | 164 const HKEY root_key = |
165 configuration.is_system_level() ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 165 configuration.is_system_level() ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
166 // This is ignored if multi-install is true. | 166 // This is ignored if multi-install is true. |
167 const wchar_t* app_guid = | 167 const wchar_t* app_guid = |
168 configuration.has_chrome_frame() ? | 168 configuration.has_chrome_frame() ? |
169 google_update::kChromeFrameAppGuid : | 169 google_update::kChromeFrameAppGuid : |
170 configuration.chrome_app_guid(); | 170 configuration.chrome_app_guid(); |
171 StackString<128> value; | 171 StackString<128> value; |
172 LONG ret; | 172 LONG ret = ERROR_SUCCESS; |
173 | 173 |
174 // When multi_install is true, we are potentially: | 174 // When multi_install is true, we are potentially: |
175 // 1. Performing a multi-install of some product(s) on a clean machine. | 175 // 1. Performing a multi-install of some product(s) on a clean machine. |
176 // Neither the product(s) nor the multi-installer will have a ClientState | 176 // Neither the product(s) nor the multi-installer will have a ClientState |
177 // key in the registry, so there is nothing to be done. | 177 // key in the registry, so there is nothing to be done. |
178 // 2. Upgrading an existing multi-install. The multi-installer will have a | 178 // 2. Upgrading an existing multi-install. The multi-installer will have a |
179 // ClientState key in the registry. Only it need be modified. | 179 // ClientState key in the registry. Only it need be modified. |
180 // 3. Migrating a single-install into a multi-install. The product will have | 180 // 3. Migrating a single-install into a multi-install. The product will have |
181 // a ClientState key in the registry. Only it need be modified. | 181 // a ClientState key in the registry. Only it need be modified. |
182 // To handle all cases, we inspect the product's ClientState to see if it | 182 // To handle all cases, we inspect the product's ClientState to see if it |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 #pragma function(memset) | 855 #pragma function(memset) |
856 void* memset(void* dest, int c, size_t count) { | 856 void* memset(void* dest, int c, size_t count) { |
857 void* start = dest; | 857 void* start = dest; |
858 while (count--) { | 858 while (count--) { |
859 *reinterpret_cast<char*>(dest) = static_cast<char>(c); | 859 *reinterpret_cast<char*>(dest) = static_cast<char>(c); |
860 dest = reinterpret_cast<char*>(dest) + 1; | 860 dest = reinterpret_cast<char*>(dest) + 1; |
861 } | 861 } |
862 return start; | 862 return start; |
863 } | 863 } |
864 } // extern "C" | 864 } // extern "C" |
OLD | NEW |