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 #include "chrome/installer/util/product.h" | 5 #include "chrome/installer/util/product.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 bool success = !application_path.empty(); | 62 bool success = !application_path.empty(); |
63 if (success) { | 63 if (success) { |
64 base::CommandLine cmd(application_path.Append(installer::kChromeExe)); | 64 base::CommandLine cmd(application_path.Append(installer::kChromeExe)); |
65 success = base::LaunchProcess(cmd, base::LaunchOptions()).IsValid(); | 65 success = base::LaunchProcess(cmd, base::LaunchOptions()).IsValid(); |
66 } | 66 } |
67 return success; | 67 return success; |
68 } | 68 } |
69 | 69 |
70 bool Product::LaunchChromeAndWait(const base::FilePath& application_path, | 70 bool Product::LaunchChromeAndWait(const base::FilePath& application_path, |
71 const base::CommandLine& options, | 71 const base::CommandLine& options, |
72 int32* exit_code) const { | 72 int32_t* exit_code) const { |
73 if (application_path.empty()) | 73 if (application_path.empty()) |
74 return false; | 74 return false; |
75 | 75 |
76 base::CommandLine cmd(application_path.Append(installer::kChromeExe)); | 76 base::CommandLine cmd(application_path.Append(installer::kChromeExe)); |
77 cmd.AppendArguments(options, false); | 77 cmd.AppendArguments(options, false); |
78 | 78 |
79 bool success = false; | 79 bool success = false; |
80 STARTUPINFOW si = { sizeof(si) }; | 80 STARTUPINFOW si = { sizeof(si) }; |
81 PROCESS_INFORMATION pi = {0}; | 81 PROCESS_INFORMATION pi = {0}; |
82 // Create a writable copy of the command line string, since CreateProcess may | 82 // Create a writable copy of the command line string, since CreateProcess may |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 if (distribution_->HasUserExperiments()) { | 164 if (distribution_->HasUserExperiments()) { |
165 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 165 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " |
166 << distribution_->GetDisplayName() | 166 << distribution_->GetDisplayName() |
167 << " system_level: " << system_level; | 167 << " system_level: " << system_level; |
168 operations_->LaunchUserExperiment( | 168 operations_->LaunchUserExperiment( |
169 setup_path, options_, status, system_level); | 169 setup_path, options_, status, system_level); |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 } // namespace installer | 173 } // namespace installer |
OLD | NEW |