| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/process/kill.h" | 8 #include "base/process/kill.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 if (!script_args.list_value()[i].VerifyTypeIs(Value::STRING, err)) | 333 if (!script_args.list_value()[i].VerifyTypeIs(Value::STRING, err)) |
| 334 return Value(); | 334 return Value(); |
| 335 cmdline.AppendArg(script_args.list_value()[i].string_value()); | 335 cmdline.AppendArg(script_args.list_value()[i].string_value()); |
| 336 } | 336 } |
| 337 | 337 |
| 338 // Log command line for debugging help. | 338 // Log command line for debugging help. |
| 339 trace.SetCommandLine(cmdline); | 339 trace.SetCommandLine(cmdline); |
| 340 base::TimeTicks begin_exec; | 340 base::TimeTicks begin_exec; |
| 341 if (g_scheduler->verbose_logging()) { | 341 if (g_scheduler->verbose_logging()) { |
| 342 #if defined(OS_WIN) | 342 #if defined(OS_WIN) |
| 343 g_scheduler->Log("Pythoning", UTF16ToUTF8(cmdline.GetCommandLineString())); | 343 g_scheduler->Log("Pythoning", |
| 344 base::UTF16ToUTF8(cmdline.GetCommandLineString())); |
| 344 #else | 345 #else |
| 345 g_scheduler->Log("Pythoning", cmdline.GetCommandLineString()); | 346 g_scheduler->Log("Pythoning", cmdline.GetCommandLineString()); |
| 346 #endif | 347 #endif |
| 347 begin_exec = base::TimeTicks::Now(); | 348 begin_exec = base::TimeTicks::Now(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 base::FilePath startup_dir = | 351 base::FilePath startup_dir = |
| 351 build_settings->GetFullPath(build_settings->build_dir()); | 352 build_settings->GetFullPath(build_settings->build_dir()); |
| 352 // The first time a build is run, no targets will have been written so the | 353 // The first time a build is run, no targets will have been written so the |
| 353 // build output directory won't exist. We need to make sure it does before | 354 // build output directory won't exist. We need to make sure it does before |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 msg += "."; | 390 msg += "."; |
| 390 *err = Err(function->function(), "Script returned non-zero exit code.", | 391 *err = Err(function->function(), "Script returned non-zero exit code.", |
| 391 msg); | 392 msg); |
| 392 return Value(); | 393 return Value(); |
| 393 } | 394 } |
| 394 | 395 |
| 395 return ConvertInputToValue(output, function, args[2], err); | 396 return ConvertInputToValue(output, function, args[2], err); |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace functions | 399 } // namespace functions |
| OLD | NEW |