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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 //! \brief Sets the exception snapshot to be returned by Exception(). | 91 //! \brief Sets the exception snapshot to be returned by Exception(). |
92 //! | 92 //! |
93 //! \param[in] exception The exception snapshot that Exception() will return. | 93 //! \param[in] exception The exception snapshot that Exception() will return. |
94 //! The TestProcessSnapshot object takes ownership of \a exception. | 94 //! The TestProcessSnapshot object takes ownership of \a exception. |
95 void SetException(scoped_ptr<ExceptionSnapshot> exception) { | 95 void SetException(scoped_ptr<ExceptionSnapshot> exception) { |
96 exception_ = exception.Pass(); | 96 exception_ = exception.Pass(); |
97 } | 97 } |
98 | 98 |
99 //! \brief Add a memory snapshot to be returned by ExtraMemory(). | 99 //! \brief Add a memory snapshot to be returned by ExtraMemory(). |
100 //! | 100 //! |
101 //! \param[in] peb The memory snapshot that will be included in ExtraMemory(). | 101 //! \param[in] extra_memory The memory snapshot that will be included in |
102 //! The TestProcessSnapshot object takes ownership of \a extra_memory. | 102 //! ExtraMemory(). The TestProcessSnapshot object takes ownership of \a |
| 103 //! extra_memory. |
103 void AddExtraMemory(scoped_ptr<MemorySnapshot> extra_memory) { | 104 void AddExtraMemory(scoped_ptr<MemorySnapshot> extra_memory) { |
104 extra_memory_.push_back(extra_memory.release()); | 105 extra_memory_.push_back(extra_memory.release()); |
105 } | 106 } |
106 | 107 |
107 // ProcessSnapshot: | 108 // ProcessSnapshot: |
108 | 109 |
109 pid_t ProcessID() const override; | 110 pid_t ProcessID() const override; |
110 pid_t ParentProcessID() const override; | 111 pid_t ParentProcessID() const override; |
111 void SnapshotTime(timeval* snapshot_time) const override; | 112 void SnapshotTime(timeval* snapshot_time) const override; |
112 void ProcessStartTime(timeval* start_time) const override; | 113 void ProcessStartTime(timeval* start_time) const override; |
(...skipping 24 matching lines...) Expand all Loading... |
137 scoped_ptr<ExceptionSnapshot> exception_; | 138 scoped_ptr<ExceptionSnapshot> exception_; |
138 PointerVector<MemorySnapshot> extra_memory_; | 139 PointerVector<MemorySnapshot> extra_memory_; |
139 | 140 |
140 DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot); | 141 DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot); |
141 }; | 142 }; |
142 | 143 |
143 } // namespace test | 144 } // namespace test |
144 } // namespace crashpad | 145 } // namespace crashpad |
145 | 146 |
146 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_PROCESS_SNAPSHOT_H_ | 147 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_PROCESS_SNAPSHOT_H_ |
OLD | NEW |