| 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 // See the corresponding header file for description of the functions in this | 5 // See the corresponding header file for description of the functions in this |
| 6 // file. | 6 // file. |
| 7 | 7 |
| 8 #include "chrome/installer/util/install_util.h" | 8 #include "chrome/installer/util/install_util.h" |
| 9 | 9 |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // This should never fail if Chrome is registered at system-level, but if it | 147 // This should never fail if Chrome is registered at system-level, but if it |
| 148 // does there is not much else to be done. | 148 // does there is not much else to be done. |
| 149 return; | 149 return; |
| 150 } | 150 } |
| 151 | 151 |
| 152 base::CommandLine cmd(base::CommandLine::FromString(cmd_str)); | 152 base::CommandLine cmd(base::CommandLine::FromString(cmd_str)); |
| 153 // Force creation of shortcuts as the First Run beacon might land between now | 153 // Force creation of shortcuts as the First Run beacon might land between now |
| 154 // and the time setup.exe checks for it. | 154 // and the time setup.exe checks for it. |
| 155 cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings); | 155 cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings); |
| 156 | 156 |
| 157 base::LaunchOptions launch_options; | |
| 158 base::Process process = | 157 base::Process process = |
| 159 base::LaunchProcess(cmd.GetCommandLineString(), launch_options); | 158 base::LaunchProcess(cmd.GetCommandLineString(), base::LaunchOptions()); |
| 160 if (!process.IsValid()) | 159 if (!process.IsValid()) |
| 161 PLOG(ERROR) << cmd.GetCommandLineString(); | 160 PLOG(ERROR) << cmd.GetCommandLineString(); |
| 162 } | 161 } |
| 163 | 162 |
| 164 bool InstallUtil::ExecuteExeAsAdmin(const base::CommandLine& cmd, | 163 bool InstallUtil::ExecuteExeAsAdmin(const base::CommandLine& cmd, |
| 165 DWORD* exit_code) { | 164 DWORD* exit_code) { |
| 166 base::FilePath::StringType program(cmd.GetProgram().value()); | 165 base::FilePath::StringType program(cmd.GetProgram().value()); |
| 167 DCHECK(!program.empty()); | 166 DCHECK(!program.empty()); |
| 168 DCHECK_NE(program[0], L'\"'); | 167 DCHECK_NE(program[0], L'\"'); |
| 169 | 168 |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 // Open the program and see if it references the expected file. | 672 // Open the program and see if it references the expected file. |
| 674 base::File file; | 673 base::File file; |
| 675 BY_HANDLE_FILE_INFORMATION info = {}; | 674 BY_HANDLE_FILE_INFORMATION info = {}; |
| 676 | 675 |
| 677 return (OpenForInfo(path, &file) && | 676 return (OpenForInfo(path, &file) && |
| 678 GetInfo(file, &info) && | 677 GetInfo(file, &info) && |
| 679 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 678 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
| 680 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 679 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
| 681 info.nFileIndexLow == file_info_.nFileIndexLow); | 680 info.nFileIndexLow == file_info_.nFileIndexLow); |
| 682 } | 681 } |
| OLD | NEW |