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

Side by Side Diff: snapshot/test/test_process_snapshot.cc

Issue 1407643004: Some plumbing for the beginning of getting handles into snapshot/minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@handles-redux
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,
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"
15 #include "snapshot/exception_snapshot.h" 16 #include "snapshot/exception_snapshot.h"
16 #include "snapshot/system_snapshot.h" 17 #include "snapshot/system_snapshot.h"
17 #include "snapshot/test/test_process_snapshot.h" 18 #include "snapshot/test/test_process_snapshot.h"
18 19
19 namespace crashpad { 20 namespace crashpad {
20 namespace test { 21 namespace test {
21 22
22 TestProcessSnapshot::TestProcessSnapshot() 23 TestProcessSnapshot::TestProcessSnapshot()
23 : process_id_(0), 24 : process_id_(0),
24 parent_process_id_(0), 25 parent_process_id_(0),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 101 }
101 102
102 std::vector<const MemoryMapRegionSnapshot*> TestProcessSnapshot::MemoryMap() 103 std::vector<const MemoryMapRegionSnapshot*> TestProcessSnapshot::MemoryMap()
103 const { 104 const {
104 std::vector<const MemoryMapRegionSnapshot*> memory_map; 105 std::vector<const MemoryMapRegionSnapshot*> memory_map;
105 for (const auto& item : memory_map_) 106 for (const auto& item : memory_map_)
106 memory_map.push_back(item); 107 memory_map.push_back(item);
107 return memory_map; 108 return memory_map;
108 } 109 }
109 110
111 std::vector<HandleSnapshot> TestProcessSnapshot::Handles() const {
112 CHECK(false);
Mark Mentovai 2015/10/14 23:55:13 Would be easy to implement, but if there’s no use
scottmg 2015/10/16 20:51:02 Implemented, I was just planning to do it in a fol
113 return std::vector<HandleSnapshot>();
114 }
115
110 std::vector<const MemorySnapshot*> TestProcessSnapshot::ExtraMemory() const { 116 std::vector<const MemorySnapshot*> TestProcessSnapshot::ExtraMemory() const {
111 std::vector<const MemorySnapshot*> extra_memory; 117 std::vector<const MemorySnapshot*> extra_memory;
112 for (const auto& em : extra_memory_) 118 for (const auto& em : extra_memory_)
113 extra_memory.push_back(em); 119 extra_memory.push_back(em);
114 return extra_memory; 120 return extra_memory;
115 } 121 }
116 122
117 } // namespace test 123 } // namespace test
118 } // namespace crashpad 124 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698