OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iostream> | 8 #include <iostream> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <set> | 10 #include <set> |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 << " --" << kHelpSwitch << " - " << kHelpSwitchHelp << "\n" | 648 << " --" << kHelpSwitch << " - " << kHelpSwitchHelp << "\n" |
649 << " --" << kFuzzerNameSwitch << " - " << kFuzzerNameSwitchHelp << "\n" | 649 << " --" << kFuzzerNameSwitch << " - " << kFuzzerNameSwitchHelp << "\n" |
650 << " --" << kFrequencySwitch << " - " << kFrequencySwitchHelp << "\n" | 650 << " --" << kFrequencySwitch << " - " << kFrequencySwitchHelp << "\n" |
651 << " --" << kTypeListSwitch << " - " << kTypeListSwitchHelp << "\n" | 651 << " --" << kTypeListSwitch << " - " << kTypeListSwitchHelp << "\n" |
652 << " --" << kPermuteSwitch << " - " << kPermuteSwitchHelp << "\n"; | 652 << " --" << kPermuteSwitch << " - " << kPermuteSwitchHelp << "\n"; |
653 } | 653 } |
654 | 654 |
655 } // namespace | 655 } // namespace |
656 | 656 |
657 int MutateMain(int argc, char** argv) { | 657 int MutateMain(int argc, char** argv) { |
658 CommandLine::Init(argc, argv); | 658 base::CommandLine::Init(argc, argv); |
659 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 659 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
660 CommandLine::StringVector args = cmd->GetArgs(); | 660 base::CommandLine::StringVector args = cmd->GetArgs(); |
661 | 661 |
662 if (args.size() != 2 || cmd->HasSwitch(kHelpSwitch)) { | 662 if (args.size() != 2 || cmd->HasSwitch(kHelpSwitch)) { |
663 usage(); | 663 usage(); |
664 return EXIT_FAILURE; | 664 return EXIT_FAILURE; |
665 } | 665 } |
666 | 666 |
667 std::string input_file_name = args[0]; | 667 std::string input_file_name = args[0]; |
668 std::string output_file_name = args[1]; | 668 std::string output_file_name = args[1]; |
669 | 669 |
670 bool permute = cmd->HasSwitch(kPermuteSwitch); | 670 bool permute = cmd->HasSwitch(kPermuteSwitch); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 return EXIT_FAILURE; | 720 return EXIT_FAILURE; |
721 | 721 |
722 return EXIT_SUCCESS; | 722 return EXIT_SUCCESS; |
723 } | 723 } |
724 | 724 |
725 } // namespace ipc_fuzzer | 725 } // namespace ipc_fuzzer |
726 | 726 |
727 int main(int argc, char** argv) { | 727 int main(int argc, char** argv) { |
728 return ipc_fuzzer::MutateMain(argc, argv); | 728 return ipc_fuzzer::MutateMain(argc, argv); |
729 } | 729 } |
OLD | NEW |