| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 void Product::InitializeFromUninstallCommand( | 60 void Product::InitializeFromUninstallCommand( |
| 61 const CommandLine& uninstall_command) { | 61 const CommandLine& uninstall_command) { |
| 62 operations_->ReadOptions(uninstall_command, &options_); | 62 operations_->ReadOptions(uninstall_command, &options_); |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool Product::LaunchChrome(const base::FilePath& application_path) const { | 65 bool Product::LaunchChrome(const base::FilePath& application_path) const { |
| 66 bool success = !application_path.empty(); | 66 bool success = !application_path.empty(); |
| 67 if (success) { | 67 if (success) { |
| 68 CommandLine cmd(application_path.Append(installer::kChromeExe)); | 68 CommandLine cmd(application_path.Append(installer::kChromeExe)); |
| 69 success = base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 69 success = base::LaunchProcess(cmd, base::LaunchOptions()).IsValid(); |
| 70 } | 70 } |
| 71 return success; | 71 return success; |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool Product::LaunchChromeAndWait(const base::FilePath& application_path, | 74 bool Product::LaunchChromeAndWait(const base::FilePath& application_path, |
| 75 const CommandLine& options, | 75 const CommandLine& options, |
| 76 int32* exit_code) const { | 76 int32* exit_code) const { |
| 77 if (application_path.empty()) | 77 if (application_path.empty()) |
| 78 return false; | 78 return false; |
| 79 | 79 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (distribution_->HasUserExperiments()) { | 168 if (distribution_->HasUserExperiments()) { |
| 169 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 169 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " |
| 170 << distribution_->GetDisplayName() | 170 << distribution_->GetDisplayName() |
| 171 << " system_level: " << system_level; | 171 << " system_level: " << system_level; |
| 172 operations_->LaunchUserExperiment( | 172 operations_->LaunchUserExperiment( |
| 173 setup_path, options_, status, system_level); | 173 setup_path, options_, status, system_level); |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace installer | 177 } // namespace installer |
| OLD | NEW |