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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void SetSourceVersion(uint16_t source_version_0, | 53 void SetSourceVersion(uint16_t source_version_0, |
54 uint16_t source_version_1, | 54 uint16_t source_version_1, |
55 uint16_t source_version_2, | 55 uint16_t source_version_2, |
56 uint16_t source_version_3) { | 56 uint16_t source_version_3) { |
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 SetUUID(const crashpad::UUID& uuid) { uuid_ = uuid; } | 63 void SetUUIDAndAge(const crashpad::UUID& uuid, uint32_t age) { |
| 64 uuid_ = uuid; |
| 65 age_ = age; |
| 66 } |
64 void SetAnnotationsVector( | 67 void SetAnnotationsVector( |
65 const std::vector<std::string>& annotations_vector) { | 68 const std::vector<std::string>& annotations_vector) { |
66 annotations_vector_ = annotations_vector; | 69 annotations_vector_ = annotations_vector; |
67 } | 70 } |
68 void SetAnnotationsSimpleMap( | 71 void SetAnnotationsSimpleMap( |
69 const std::map<std::string, std::string>& annotations_simple_map) { | 72 const std::map<std::string, std::string>& annotations_simple_map) { |
70 annotations_simple_map_ = annotations_simple_map; | 73 annotations_simple_map_ = annotations_simple_map; |
71 } | 74 } |
72 | 75 |
73 // ModuleSnapshot: | 76 // ModuleSnapshot: |
74 | 77 |
75 std::string Name() const override; | 78 std::string Name() const override; |
76 uint64_t Address() const override; | 79 uint64_t Address() const override; |
77 uint64_t Size() const override; | 80 uint64_t Size() const override; |
78 time_t Timestamp() const override; | 81 time_t Timestamp() const override; |
79 void FileVersion(uint16_t* version_0, | 82 void FileVersion(uint16_t* version_0, |
80 uint16_t* version_1, | 83 uint16_t* version_1, |
81 uint16_t* version_2, | 84 uint16_t* version_2, |
82 uint16_t* version_3) const override; | 85 uint16_t* version_3) const override; |
83 void SourceVersion(uint16_t* version_0, | 86 void SourceVersion(uint16_t* version_0, |
84 uint16_t* version_1, | 87 uint16_t* version_1, |
85 uint16_t* version_2, | 88 uint16_t* version_2, |
86 uint16_t* version_3) const override; | 89 uint16_t* version_3) const override; |
87 ModuleType GetModuleType() const override; | 90 ModuleType GetModuleType() const override; |
88 void UUID(crashpad::UUID* uuid) const override; | 91 void UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const override; |
89 std::vector<std::string> AnnotationsVector() const override; | 92 std::vector<std::string> AnnotationsVector() const override; |
90 std::map<std::string, std::string> AnnotationsSimpleMap() const override; | 93 std::map<std::string, std::string> AnnotationsSimpleMap() const override; |
91 | 94 |
92 private: | 95 private: |
93 std::string name_; | 96 std::string name_; |
94 uint64_t address_; | 97 uint64_t address_; |
95 uint64_t size_; | 98 uint64_t size_; |
96 time_t timestamp_; | 99 time_t timestamp_; |
97 uint16_t file_version_[4]; | 100 uint16_t file_version_[4]; |
98 uint16_t source_version_[4]; | 101 uint16_t source_version_[4]; |
99 ModuleType module_type_; | 102 ModuleType module_type_; |
| 103 uint32_t age_; |
100 crashpad::UUID uuid_; | 104 crashpad::UUID uuid_; |
101 std::vector<std::string> annotations_vector_; | 105 std::vector<std::string> annotations_vector_; |
102 std::map<std::string, std::string> annotations_simple_map_; | 106 std::map<std::string, std::string> annotations_simple_map_; |
103 | 107 |
104 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot); | 108 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot); |
105 }; | 109 }; |
106 | 110 |
107 } // namespace test | 111 } // namespace test |
108 } // namespace crashpad | 112 } // namespace crashpad |
109 | 113 |
110 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_ | 114 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_ |
OLD | NEW |