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, |
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 #include "base/logging.h" |
| 16 #include "base/memory/ptr_util.h" |
15 #include "snapshot/mac/process_snapshot_mac.h" | 17 #include "snapshot/mac/process_snapshot_mac.h" |
16 | |
17 #include "base/logging.h" | |
18 #include "util/misc/tri_state.h" | 18 #include "util/misc/tri_state.h" |
19 | 19 |
20 namespace crashpad { | 20 namespace crashpad { |
21 | 21 |
22 ProcessSnapshotMac::ProcessSnapshotMac() | 22 ProcessSnapshotMac::ProcessSnapshotMac() |
23 : ProcessSnapshot(), | 23 : ProcessSnapshot(), |
24 system_(), | 24 system_(), |
25 threads_(), | 25 threads_(), |
26 modules_(), | 26 modules_(), |
27 exception_(), | 27 exception_(), |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 std::vector<const MemorySnapshot*> ProcessSnapshotMac::ExtraMemory() const { | 211 std::vector<const MemorySnapshot*> ProcessSnapshotMac::ExtraMemory() const { |
212 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 212 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
213 return std::vector<const MemorySnapshot*>(); | 213 return std::vector<const MemorySnapshot*>(); |
214 } | 214 } |
215 | 215 |
216 void ProcessSnapshotMac::InitializeThreads() { | 216 void ProcessSnapshotMac::InitializeThreads() { |
217 const std::vector<ProcessReader::Thread>& process_reader_threads = | 217 const std::vector<ProcessReader::Thread>& process_reader_threads = |
218 process_reader_.Threads(); | 218 process_reader_.Threads(); |
219 for (const ProcessReader::Thread& process_reader_thread : | 219 for (const ProcessReader::Thread& process_reader_thread : |
220 process_reader_threads) { | 220 process_reader_threads) { |
221 auto thread = make_scoped_ptr(new internal::ThreadSnapshotMac()); | 221 auto thread = base::WrapUnique(new internal::ThreadSnapshotMac()); |
222 if (thread->Initialize(&process_reader_, process_reader_thread)) { | 222 if (thread->Initialize(&process_reader_, process_reader_thread)) { |
223 threads_.push_back(thread.release()); | 223 threads_.push_back(thread.release()); |
224 } | 224 } |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 void ProcessSnapshotMac::InitializeModules() { | 228 void ProcessSnapshotMac::InitializeModules() { |
229 const std::vector<ProcessReader::Module>& process_reader_modules = | 229 const std::vector<ProcessReader::Module>& process_reader_modules = |
230 process_reader_.Modules(); | 230 process_reader_.Modules(); |
231 for (const ProcessReader::Module& process_reader_module : | 231 for (const ProcessReader::Module& process_reader_module : |
232 process_reader_modules) { | 232 process_reader_modules) { |
233 auto module = make_scoped_ptr(new internal::ModuleSnapshotMac()); | 233 auto module = base::WrapUnique(new internal::ModuleSnapshotMac()); |
234 if (module->Initialize(&process_reader_, process_reader_module)) { | 234 if (module->Initialize(&process_reader_, process_reader_module)) { |
235 modules_.push_back(module.release()); | 235 modules_.push_back(module.release()); |
236 } | 236 } |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 } // namespace crashpad | 240 } // namespace crashpad |
OLD | NEW |