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_process_snapshot.cc

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
Patch Set: . Created 5 years, 2 months 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 15 matching lines...) Expand all
26 process_start_time_(), 26 process_start_time_(),
27 process_cpu_user_time_(), 27 process_cpu_user_time_(),
28 process_cpu_system_time_(), 28 process_cpu_system_time_(),
29 report_id_(), 29 report_id_(),
30 client_id_(), 30 client_id_(),
31 annotations_simple_map_(), 31 annotations_simple_map_(),
32 system_(), 32 system_(),
33 threads_(), 33 threads_(),
34 modules_(), 34 modules_(),
35 exception_(), 35 exception_(),
36 memory_map_(),
36 extra_memory_() { 37 extra_memory_() {
37 } 38 }
38 39
39 TestProcessSnapshot::~TestProcessSnapshot() { 40 TestProcessSnapshot::~TestProcessSnapshot() {
40 } 41 }
41 42
42 pid_t TestProcessSnapshot::ProcessID() const { 43 pid_t TestProcessSnapshot::ProcessID() const {
43 return process_id_; 44 return process_id_;
44 } 45 }
45 46
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 for (const ModuleSnapshot* module : modules_) { 92 for (const ModuleSnapshot* module : modules_) {
92 modules.push_back(module); 93 modules.push_back(module);
93 } 94 }
94 return modules; 95 return modules;
95 } 96 }
96 97
97 const ExceptionSnapshot* TestProcessSnapshot::Exception() const { 98 const ExceptionSnapshot* TestProcessSnapshot::Exception() const {
98 return exception_.get(); 99 return exception_.get();
99 } 100 }
100 101
102 const MemoryMapSnapshot* TestProcessSnapshot::MemoryMap() const {
103 return memory_map_.get();
104 }
105
101 std::vector<const MemorySnapshot*> TestProcessSnapshot::ExtraMemory() const { 106 std::vector<const MemorySnapshot*> TestProcessSnapshot::ExtraMemory() const {
102 std::vector<const MemorySnapshot*> extra_memory; 107 std::vector<const MemorySnapshot*> extra_memory;
103 for (const auto& em : extra_memory_) 108 for (const auto& em : extra_memory_)
104 extra_memory.push_back(em); 109 extra_memory.push_back(em);
105 return extra_memory; 110 return extra_memory;
106 } 111 }
107 112
108 } // namespace test 113 } // namespace test
109 } // namespace crashpad 114 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698