OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 5 #include <vector> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 int main(int argc, const char* argv[]) { | 398 int main(int argc, const char* argv[]) { |
399 base::AtExitManager at_exit_manager; | 399 base::AtExitManager at_exit_manager; |
400 CommandLine::Init(argc, argv); | 400 CommandLine::Init(argc, argv); |
401 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 401 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
402 | 402 |
403 (void)logging::InitLogging( | 403 (void)logging::InitLogging( |
404 FILE_PATH_LITERAL("courgette.log"), | 404 FILE_PATH_LITERAL("courgette.log"), |
405 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, | 405 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, |
406 logging::LOCK_LOG_FILE, | 406 logging::LOCK_LOG_FILE, |
407 logging::APPEND_TO_OLD_LOG_FILE, | 407 logging::APPEND_TO_OLD_LOG_FILE, |
408 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 408 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS, |
| 409 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
409 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 410 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
410 | 411 |
411 bool cmd_dis = command_line.HasSwitch("dis"); | 412 bool cmd_dis = command_line.HasSwitch("dis"); |
412 bool cmd_asm = command_line.HasSwitch("asm"); | 413 bool cmd_asm = command_line.HasSwitch("asm"); |
413 bool cmd_disadj = command_line.HasSwitch("disadj"); | 414 bool cmd_disadj = command_line.HasSwitch("disadj"); |
414 bool cmd_make_patch = command_line.HasSwitch("gen"); | 415 bool cmd_make_patch = command_line.HasSwitch("gen"); |
415 bool cmd_apply_patch = command_line.HasSwitch("apply"); | 416 bool cmd_apply_patch = command_line.HasSwitch("apply"); |
416 bool cmd_make_bsdiff_patch = command_line.HasSwitch("genbsdiff"); | 417 bool cmd_make_bsdiff_patch = command_line.HasSwitch("genbsdiff"); |
417 bool cmd_apply_bsdiff_patch = command_line.HasSwitch("applybsdiff"); | 418 bool cmd_apply_bsdiff_patch = command_line.HasSwitch("applybsdiff"); |
418 bool cmd_spread_1_adjusted = command_line.HasSwitch("gen1a"); | 419 bool cmd_spread_1_adjusted = command_line.HasSwitch("gen1a"); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) { | 478 } else if (cmd_spread_1_adjusted || cmd_spread_1_unadjusted) { |
478 if (values.size() != 3) | 479 if (values.size() != 3) |
479 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>"); | 480 UsageProblem("-gen1[au] <old_file> <new_file> <patch_files_root>"); |
480 DisassembleAdjustDiff(values[0], values[1], values[2], | 481 DisassembleAdjustDiff(values[0], values[1], values[2], |
481 cmd_spread_1_adjusted); | 482 cmd_spread_1_adjusted); |
482 } else { | 483 } else { |
483 UsageProblem("No operation specified"); | 484 UsageProblem("No operation specified"); |
484 } | 485 } |
485 } | 486 } |
486 } | 487 } |
OLD | NEW |