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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 return true; | 250 return true; |
251 } | 251 } |
252 | 252 |
253 // Failing that, look in Chrome Frame's client state key if --chrome-frame was | 253 // Failing that, look in Chrome Frame's client state key if --chrome-frame was |
254 // specified. | 254 // specified. |
255 if (configuration.has_chrome_frame() && GetSetupExePathForGuidFromRegistry( | 255 if (configuration.has_chrome_frame() && GetSetupExePathForGuidFromRegistry( |
256 system_level, google_update::kChromeFrameAppGuid, path, size)) { | 256 system_level, google_update::kChromeFrameAppGuid, path, size)) { |
257 return true; | 257 return true; |
258 } | 258 } |
259 | 259 |
260 // Make a last-ditch effort to look in the Chrome and App Host client state | 260 // Make a last-ditch effort to look in the Chrome client state key. |
261 // keys. | |
262 if (GetSetupExePathForGuidFromRegistry( | 261 if (GetSetupExePathForGuidFromRegistry( |
263 system_level, configuration.chrome_app_guid(), path, size)) { | 262 system_level, configuration.chrome_app_guid(), path, size)) { |
264 return true; | 263 return true; |
265 } | 264 } |
266 if (configuration.has_app_host() && GetSetupExePathForGuidFromRegistry( | |
267 system_level, google_update::kChromeAppHostAppGuid, path, size)) { | |
268 return true; | |
269 } | |
270 | 265 |
271 return false; | 266 return false; |
272 } | 267 } |
273 | 268 |
274 // Calls CreateProcess with good default parameters and waits for the process to | 269 // Calls CreateProcess with good default parameters and waits for the process to |
275 // terminate returning the process exit code. |exit_code|, if non-NULL, is | 270 // terminate returning the process exit code. |exit_code|, if non-NULL, is |
276 // populated with the process exit code. | 271 // populated with the process exit code. |
277 bool RunProcessAndWait(const wchar_t* exe_path, wchar_t* cmdline, | 272 bool RunProcessAndWait(const wchar_t* exe_path, wchar_t* cmdline, |
278 ProcessExitCode* exit_code) { | 273 ProcessExitCode* exit_code) { |
279 STARTUPINFOW si = {sizeof(si)}; | 274 STARTUPINFOW si = {sizeof(si)}; |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 #pragma function(memset) | 862 #pragma function(memset) |
868 void* memset(void* dest, int c, size_t count) { | 863 void* memset(void* dest, int c, size_t count) { |
869 void* start = dest; | 864 void* start = dest; |
870 while (count--) { | 865 while (count--) { |
871 *reinterpret_cast<char*>(dest) = static_cast<char>(c); | 866 *reinterpret_cast<char*>(dest) = static_cast<char>(c); |
872 dest = reinterpret_cast<char*>(dest) + 1; | 867 dest = reinterpret_cast<char*>(dest) + 1; |
873 } | 868 } |
874 return start; | 869 return start; |
875 } | 870 } |
876 } // extern "C" | 871 } // extern "C" |
OLD | NEW |