| 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/test/mini_installer_test/installer_test_util.h" | 5 #include "chrome/test/mini_installer_test/installer_test_util.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 LOG(ERROR) << "Command executable does not exist: " | 284 LOG(ERROR) << "Command executable does not exist: " |
| 285 << command.GetProgram().MaybeAsASCII(); | 285 << command.GetProgram().MaybeAsASCII(); |
| 286 return false; | 286 return false; |
| 287 } | 287 } |
| 288 base::ProcessHandle process; | 288 base::ProcessHandle process; |
| 289 if (!base::LaunchProcess(command, base::LaunchOptions(), &process)) { | 289 if (!base::LaunchProcess(command, base::LaunchOptions(), &process)) { |
| 290 LOG(ERROR) << "Failed to launch command: " | 290 LOG(ERROR) << "Failed to launch command: " |
| 291 << command.GetCommandLineString(); | 291 << command.GetCommandLineString(); |
| 292 return false; | 292 return false; |
| 293 } | 293 } |
| 294 if (!base::WaitForSingleProcess(process, 60 * 1000)) { | 294 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { |
| 295 LOG(ERROR) << "Launched process did not complete."; | 295 LOG(ERROR) << "Launched process did not complete."; |
| 296 return false; | 296 return false; |
| 297 } | 297 } |
| 298 return true; | 298 return true; |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace | 301 } // namespace |
| OLD | NEW |