Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: snapshot/test/test_module_snapshot.h

Issue 1415543003: win: Plumb module PDB name through snapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 SetPDBName(const std::string& pdb_name) { pdb_name_ = pdb_name; }
67 void SetAnnotationsVector( 68 void SetAnnotationsVector(
68 const std::vector<std::string>& annotations_vector) { 69 const std::vector<std::string>& annotations_vector) {
69 annotations_vector_ = annotations_vector; 70 annotations_vector_ = annotations_vector;
70 } 71 }
71 void SetAnnotationsSimpleMap( 72 void SetAnnotationsSimpleMap(
72 const std::map<std::string, std::string>& annotations_simple_map) { 73 const std::map<std::string, std::string>& annotations_simple_map) {
73 annotations_simple_map_ = annotations_simple_map; 74 annotations_simple_map_ = annotations_simple_map;
74 } 75 }
75 76
76 // ModuleSnapshot: 77 // ModuleSnapshot:
77 78
78 std::string Name() const override; 79 std::string Name() const override;
79 uint64_t Address() const override; 80 uint64_t Address() const override;
80 uint64_t Size() const override; 81 uint64_t Size() const override;
81 time_t Timestamp() const override; 82 time_t Timestamp() const override;
82 void FileVersion(uint16_t* version_0, 83 void FileVersion(uint16_t* version_0,
83 uint16_t* version_1, 84 uint16_t* version_1,
84 uint16_t* version_2, 85 uint16_t* version_2,
85 uint16_t* version_3) const override; 86 uint16_t* version_3) const override;
86 void SourceVersion(uint16_t* version_0, 87 void SourceVersion(uint16_t* version_0,
87 uint16_t* version_1, 88 uint16_t* version_1,
88 uint16_t* version_2, 89 uint16_t* version_2,
89 uint16_t* version_3) const override; 90 uint16_t* version_3) const override;
90 ModuleType GetModuleType() const override; 91 ModuleType GetModuleType() const override;
91 void UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const override; 92 void UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const override;
93 std::string PDBName() const override;
92 std::vector<std::string> AnnotationsVector() const override; 94 std::vector<std::string> AnnotationsVector() const override;
93 std::map<std::string, std::string> AnnotationsSimpleMap() const override; 95 std::map<std::string, std::string> AnnotationsSimpleMap() const override;
94 96
95 private: 97 private:
96 std::string name_; 98 std::string name_;
97 uint64_t address_; 99 uint64_t address_;
98 uint64_t size_; 100 uint64_t size_;
99 time_t timestamp_; 101 time_t timestamp_;
100 uint16_t file_version_[4]; 102 uint16_t file_version_[4];
101 uint16_t source_version_[4]; 103 uint16_t source_version_[4];
102 ModuleType module_type_; 104 ModuleType module_type_;
103 uint32_t age_; 105 uint32_t age_;
104 crashpad::UUID uuid_; 106 crashpad::UUID uuid_;
107 std::string pdb_name_;
105 std::vector<std::string> annotations_vector_; 108 std::vector<std::string> annotations_vector_;
106 std::map<std::string, std::string> annotations_simple_map_; 109 std::map<std::string, std::string> annotations_simple_map_;
107 110
108 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot); 111 DISALLOW_COPY_AND_ASSIGN(TestModuleSnapshot);
109 }; 112 };
110 113
111 } // namespace test 114 } // namespace test
112 } // namespace crashpad 115 } // namespace crashpad
113 116
114 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_ 117 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_MODULE_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698