| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. 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, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 source_version_[0] = source_version_0; | 57 source_version_[0] = source_version_0; |
| 58 source_version_[1] = source_version_1; | 58 source_version_[1] = source_version_1; |
| 59 source_version_[2] = source_version_2; | 59 source_version_[2] = source_version_2; |
| 60 source_version_[3] = source_version_3; | 60 source_version_[3] = source_version_3; |
| 61 } | 61 } |
| 62 void SetModuleType(ModuleType module_type) { module_type_ = module_type; } | 62 void SetModuleType(ModuleType module_type) { module_type_ = module_type; } |
| 63 void SetUUIDAndAge(const crashpad::UUID& uuid, uint32_t age) { | 63 void SetUUIDAndAge(const crashpad::UUID& uuid, uint32_t age) { |
| 64 uuid_ = uuid; | 64 uuid_ = uuid; |
| 65 age_ = age; | 65 age_ = age; |
| 66 } | 66 } |
| 67 void SetDebugFileName(const std::string& debug_file_name) { |
| 68 debug_file_name_ = debug_file_name; |
| 69 } |
| 67 void SetAnnotationsVector( | 70 void SetAnnotationsVector( |
| 68 const std::vector<std::string>& annotations_vector) { | 71 const std::vector<std::string>& annotations_vector) { |
| 69 annotations_vector_ = annotations_vector; | 72 annotations_vector_ = annotations_vector; |
| 70 } | 73 } |
| 71 void SetAnnotationsSimpleMap( | 74 void SetAnnotationsSimpleMap( |
| 72 const std::map<std::string, std::string>& annotations_simple_map) { | 75 const std::map<std::string, std::string>& annotations_simple_map) { |
| 73 annotations_simple_map_ = annotations_simple_map; | 76 annotations_simple_map_ = annotations_simple_map; |
| 74 } | 77 } |
| 75 | 78 |
| 76 // ModuleSnapshot: | 79 // ModuleSnapshot: |
| 77 | 80 |
| 78 std::string Name() const override; | 81 std::string Name() const override; |
| 79 uint64_t Address() const override; | 82 uint64_t Address() const override; |
| 80 uint64_t Size() const override; | 83 uint64_t Size() const override; |
| 81 time_t Timestamp() const override; | 84 time_t Timestamp() const override; |
| 82 void FileVersion(uint16_t* version_0, | 85 void FileVersion(uint16_t* version_0, |
| 83 uint16_t* version_1, | 86 uint16_t* version_1, |
| 84 uint16_t* version_2, | 87 uint16_t* version_2, |
| 85 uint16_t* version_3) const override; | 88 uint16_t* version_3) const override; |
| 86 void SourceVersion(uint16_t* version_0, | 89 void SourceVersion(uint16_t* version_0, |
| 87 uint16_t* version_1, | 90 uint16_t* version_1, |
| 88 uint16_t* version_2, | 91 uint16_t* version_2, |
| 89 uint16_t* version_3) const override; | 92 uint16_t* version_3) const override; |
| 90 ModuleType GetModuleType() const override; | 93 ModuleType GetModuleType() const override; |
| 91 void UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const override; | 94 void UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const override; |
| 95 std::string DebugFileName() const override; |
| 92 std::vector<std::string> AnnotationsVector() const override; | 96 std::vector<std::string> AnnotationsVector() const override; |
| 93 std::map<std::string, std::string> AnnotationsSimpleMap() const override; | 97 std::map<std::string, std::string> AnnotationsSimpleMap() const override; |
| 94 | 98 |
| 95 private: | 99 private: |
| 96 std::string name_; | 100 std::string name_; |
| 97 uint64_t address_; | 101 uint64_t address_; |
| 98 uint64_t size_; | 102 uint64_t size_; |
| 99 time_t timestamp_; | 103 time_t timestamp_; |
| 100 uint16_t file_version_[4]; | 104 uint16_t file_version_[4]; |
| 101 uint16_t source_version_[4]; | 105 uint16_t source_version_[4]; |
| 102 ModuleType module_type_; | 106 ModuleType module_type_; |
| 103 uint32_t age_; | 107 uint32_t age_; |
| 104 crashpad::UUID uuid_; | 108 crashpad::UUID uuid_; |
| 109 std::string debug_file_name_; |
| 105 std::vector<std::string> annotations_vector_; | 110 std::vector<std::string> annotations_vector_; |
| 106 std::map<std::string, std::string> annotations_simple_map_; | 111 std::map<std::string, std::string> annotations_simple_map_; |
| 107 | 112 |
| 108 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot); | 113 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot); |
| 109 }; | 114 }; |
| 110 | 115 |
| 111 } // namespace test | 116 } // namespace test |
| 112 } // namespace crashpad | 117 } // namespace crashpad |
| 113 | 118 |
| 114 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_ | 119 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_ |
| OLD | NEW |