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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 CommandLine cmd(CommandLine::FromString(cmd_str)); | 151 CommandLine cmd(CommandLine::FromString(cmd_str)); |
152 // Force creation of shortcuts as the First Run beacon might land between now | 152 // Force creation of shortcuts as the First Run beacon might land between now |
153 // and the time setup.exe checks for it. | 153 // and the time setup.exe checks for it. |
154 cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings); | 154 cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings); |
155 | 155 |
156 base::LaunchOptions launch_options; | 156 base::LaunchOptions launch_options; |
157 if (base::win::IsMetroProcess()) | 157 if (base::win::IsMetroProcess()) |
158 launch_options.force_breakaway_from_job_ = true; | 158 launch_options.force_breakaway_from_job_ = true; |
159 base::Process process = | 159 if (!base::LaunchProcess(cmd.GetCommandLineString(), launch_options, NULL)) |
160 base::LaunchProcess(cmd.GetCommandLineString(), launch_options); | |
161 if (!process.IsValid()) | |
162 PLOG(ERROR) << cmd.GetCommandLineString(); | 160 PLOG(ERROR) << cmd.GetCommandLineString(); |
163 } | 161 } |
164 | 162 |
165 bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) { | 163 bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) { |
166 base::FilePath::StringType program(cmd.GetProgram().value()); | 164 base::FilePath::StringType program(cmd.GetProgram().value()); |
167 DCHECK(!program.empty()); | 165 DCHECK(!program.empty()); |
168 DCHECK_NE(program[0], L'\"'); | 166 DCHECK_NE(program[0], L'\"'); |
169 | 167 |
170 CommandLine::StringType params(cmd.GetCommandLineString()); | 168 CommandLine::StringType params(cmd.GetCommandLineString()); |
171 if (params[0] == '"') { | 169 if (params[0] == '"') { |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 // Open the program and see if it references the expected file. | 646 // Open the program and see if it references the expected file. |
649 base::File file; | 647 base::File file; |
650 BY_HANDLE_FILE_INFORMATION info = {}; | 648 BY_HANDLE_FILE_INFORMATION info = {}; |
651 | 649 |
652 return (OpenForInfo(path, &file) && | 650 return (OpenForInfo(path, &file) && |
653 GetInfo(file, &info) && | 651 GetInfo(file, &info) && |
654 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && | 652 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && |
655 info.nFileIndexHigh == file_info_.nFileIndexHigh && | 653 info.nFileIndexHigh == file_info_.nFileIndexHigh && |
656 info.nFileIndexLow == file_info_.nFileIndexLow); | 654 info.nFileIndexLow == file_info_.nFileIndexLow); |
657 } | 655 } |
OLD | NEW |