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

Side by Side Diff: snapshot/mac/process_snapshot_mac.cc

Issue 1000263003: Add MinidumpCrashpadInfo::report_id (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « snapshot/mac/process_snapshot_mac.h ('k') | snapshot/minidump/process_snapshot_minidump.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "snapshot/mac/process_snapshot_mac.h" 15 #include "snapshot/mac/process_snapshot_mac.h"
16 16
17 #include "util/misc/tri_state.h" 17 #include "util/misc/tri_state.h"
18 18
19 namespace crashpad { 19 namespace crashpad {
20 20
21 ProcessSnapshotMac::ProcessSnapshotMac() 21 ProcessSnapshotMac::ProcessSnapshotMac()
22 : ProcessSnapshot(), 22 : ProcessSnapshot(),
23 system_(), 23 system_(),
24 threads_(), 24 threads_(),
25 modules_(), 25 modules_(),
26 exception_(), 26 exception_(),
27 process_reader_(), 27 process_reader_(),
28 report_id_(),
28 client_id_(), 29 client_id_(),
29 annotations_simple_map_(), 30 annotations_simple_map_(),
30 snapshot_time_(), 31 snapshot_time_(),
31 initialized_() { 32 initialized_() {
32 } 33 }
33 34
34 ProcessSnapshotMac::~ProcessSnapshotMac() { 35 ProcessSnapshotMac::~ProcessSnapshotMac() {
35 } 36 }
36 37
37 bool ProcessSnapshotMac::Initialize(task_t task) { 38 bool ProcessSnapshotMac::Initialize(task_t task) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 132 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
132 process_reader_.StartTime(start_time); 133 process_reader_.StartTime(start_time);
133 } 134 }
134 135
135 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time, 136 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time,
136 timeval* system_time) const { 137 timeval* system_time) const {
137 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 138 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
138 process_reader_.CPUTimes(user_time, system_time); 139 process_reader_.CPUTimes(user_time, system_time);
139 } 140 }
140 141
142 void ProcessSnapshotMac::ReportID(UUID* report_id) const {
143 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
144 *report_id = report_id_;
145 }
146
141 void ProcessSnapshotMac::ClientID(UUID* client_id) const { 147 void ProcessSnapshotMac::ClientID(UUID* client_id) const {
142 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 148 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
143 *client_id = client_id_; 149 *client_id = client_id_;
144 } 150 }
145 151
146 const std::map<std::string, std::string>& 152 const std::map<std::string, std::string>&
147 ProcessSnapshotMac::AnnotationsSimpleMap() const { 153 ProcessSnapshotMac::AnnotationsSimpleMap() const {
148 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 154 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
149 return annotations_simple_map_; 155 return annotations_simple_map_;
150 } 156 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 for (const ProcessReader::Module& process_reader_module : 201 for (const ProcessReader::Module& process_reader_module :
196 process_reader_modules) { 202 process_reader_modules) {
197 auto module = make_scoped_ptr(new internal::ModuleSnapshotMac()); 203 auto module = make_scoped_ptr(new internal::ModuleSnapshotMac());
198 if (module->Initialize(&process_reader_, process_reader_module)) { 204 if (module->Initialize(&process_reader_, process_reader_module)) {
199 modules_.push_back(module.release()); 205 modules_.push_back(module.release());
200 } 206 }
201 } 207 }
202 } 208 }
203 209
204 } // namespace crashpad 210 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/mac/process_snapshot_mac.h ('k') | snapshot/minidump/process_snapshot_minidump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698