| OLD | NEW |
| 1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 92 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 93 return process_reader_.ParentProcessID(); | 93 return process_reader_.ParentProcessID(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ProcessSnapshotWin::SnapshotTime(timeval* snapshot_time) const { | 96 void ProcessSnapshotWin::SnapshotTime(timeval* snapshot_time) const { |
| 97 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 97 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 98 *snapshot_time = snapshot_time_; | 98 *snapshot_time = snapshot_time_; |
| 99 } | 99 } |
| 100 | 100 |
| 101 void ProcessSnapshotWin::ProcessStartTime(timeval* start_time) const { | 101 void ProcessSnapshotWin::ProcessStartTime(timeval* start_time) const { |
| 102 CHECK(false) << "TODO(scottmg)"; | 102 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 103 process_reader_.StartTime(start_time); |
| 103 } | 104 } |
| 104 | 105 |
| 105 void ProcessSnapshotWin::ProcessCPUTimes(timeval* user_time, | 106 void ProcessSnapshotWin::ProcessCPUTimes(timeval* user_time, |
| 106 timeval* system_time) const { | 107 timeval* system_time) const { |
| 107 CHECK(false) << "TODO(scottmg)"; | 108 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 109 process_reader_.CPUTimes(user_time, system_time); |
| 108 } | 110 } |
| 109 | 111 |
| 110 void ProcessSnapshotWin::ReportID(UUID* report_id) const { | 112 void ProcessSnapshotWin::ReportID(UUID* report_id) const { |
| 111 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 113 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 112 *report_id = report_id_; | 114 *report_id = report_id_; |
| 113 } | 115 } |
| 114 | 116 |
| 115 void ProcessSnapshotWin::ClientID(UUID* client_id) const { | 117 void ProcessSnapshotWin::ClientID(UUID* client_id) const { |
| 116 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 118 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 117 *client_id = client_id_; | 119 *client_id = client_id_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 for (const ProcessInfo::Module& process_reader_module : | 155 for (const ProcessInfo::Module& process_reader_module : |
| 154 process_reader_modules) { | 156 process_reader_modules) { |
| 155 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin()); | 157 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin()); |
| 156 if (module->Initialize(&process_reader_, process_reader_module)) { | 158 if (module->Initialize(&process_reader_, process_reader_module)) { |
| 157 modules_.push_back(module.release()); | 159 modules_.push_back(module.release()); |
| 158 } | 160 } |
| 159 } | 161 } |
| 160 } | 162 } |
| 161 | 163 |
| 162 } // namespace crashpad | 164 } // namespace crashpad |
| OLD | NEW |