| OLD | NEW |
| 1 // Copyright 2015 Google Inc. All Rights Reserved. | 1 // Copyright 2015 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #ifndef SYZYGY_POIROT_POIROT_APP_H_ | 15 #ifndef SYZYGY_PROTECT_PROTECT_LIB_PROTECT_APP_H_ |
| 16 #define SYZYGY_POIROT_POIROT_APP_H_ | 16 #define SYZYGY_PROTECT_PROTECT_LIB_PROTECT_APP_H_ |
| 17 | 17 |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
| 20 #include "base/strings/string_piece.h" | 20 #include "base/strings/string_piece.h" |
| 21 #include "base/time/time.h" |
| 22 #include "base/values.h" |
| 21 #include "syzygy/application/application.h" | 23 #include "syzygy/application/application.h" |
| 22 #include "syzygy/poirot/minidump_processor.h" | 24 #include "syzygy/block_graph/block_graph.h" |
| 25 #include "syzygy/experimental/protect/protect_lib/protect_flummox.h" |
| 23 | 26 |
| 24 namespace poirot { | 27 namespace protect { |
| 25 | 28 |
| 26 // This class implements the minidump processor command-line utility. | 29 // This class implements the command-line Protect utility. |
| 27 // | 30 class ProtectApp : public application::AppImplBase { |
| 28 // See the description given in PoirotApp:::PrintUsage() for | 31 public: |
| 29 // information about running this utility. | 32 ProtectApp() : AppImplBase("ProtectApp") {} |
| 30 class PoirotApp : public application::AppImplBase { | 33 |
| 31 public: | |
| 32 // @name Implementation of the AppImplBase interface. | 34 // @name Implementation of the AppImplBase interface. |
| 33 // @{ | 35 // @{ |
| 34 PoirotApp() : application::AppImplBase("PoirotApp") {} | |
| 35 | |
| 36 bool ParseCommandLine(const base::CommandLine* command_line); | 36 bool ParseCommandLine(const base::CommandLine* command_line); |
| 37 | 37 bool SetUp(); |
| 38 int Run(); | 38 int Run(); |
| 39 // @} | 39 // @} |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 // @name Utility function | 42 bool overwrite_; |
| 43 // @{ | 43 scoped_ptr<CustomFlummoxInstrumenter> instrumenter_; |
| 44 void PrintUsage(const base::FilePath& program, | |
| 45 const base::StringPiece& message); | |
| 46 // @} | |
| 47 | |
| 48 // @name Command-line options. | |
| 49 // @{ | |
| 50 base::FilePath input_minidump_; | |
| 51 base::FilePath output_file_; | |
| 52 // @} | |
| 53 | 44 |
| 54 private: | 45 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(PoirotApp); | 46 DISALLOW_COPY_AND_ASSIGN(ProtectApp); |
| 56 }; | 47 }; |
| 57 | 48 |
| 58 } // namespace poirot | 49 } // namespace protect |
| 59 | 50 |
| 60 #endif // SYZYGY_POIROT_POIROT_APP_H_ | 51 #endif // SYZYGY_PROTECT_PROTECT_LIB_PROTECT_APP_H_ |
| OLD | NEW |