| 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, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time, | 102 void ProcessSnapshotMac::ProcessCPUTimes(timeval* user_time, |
| 103 timeval* system_time) const { | 103 timeval* system_time) const { |
| 104 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 104 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 105 process_reader_.CPUTimes(user_time, system_time); | 105 process_reader_.CPUTimes(user_time, system_time); |
| 106 } | 106 } |
| 107 | 107 |
| 108 const std::map<std::string, std::string>& | 108 const std::map<std::string, std::string>& |
| 109 ProcessSnapshotMac::AnnotationsSimpleMap() const { | 109 ProcessSnapshotMac::AnnotationsSimpleMap() const { |
| 110 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 110 return annotations_simple_map_; | 111 return annotations_simple_map_; |
| 111 } | 112 } |
| 112 | 113 |
| 113 const SystemSnapshot* ProcessSnapshotMac::System() const { | 114 const SystemSnapshot* ProcessSnapshotMac::System() const { |
| 114 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 115 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 115 return &system_; | 116 return &system_; |
| 116 } | 117 } |
| 117 | 118 |
| 118 std::vector<const ThreadSnapshot*> ProcessSnapshotMac::Threads() const { | 119 std::vector<const ThreadSnapshot*> ProcessSnapshotMac::Threads() const { |
| 119 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 120 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 process_reader_modules) { | 159 process_reader_modules) { |
| 159 internal::ModuleSnapshotMac* module = new internal::ModuleSnapshotMac(); | 160 internal::ModuleSnapshotMac* module = new internal::ModuleSnapshotMac(); |
| 160 modules_.push_back(module); | 161 modules_.push_back(module); |
| 161 if (!module->Initialize(&process_reader_, process_reader_module)) { | 162 if (!module->Initialize(&process_reader_, process_reader_module)) { |
| 162 modules_.pop_back(); | 163 modules_.pop_back(); |
| 163 } | 164 } |
| 164 } | 165 } |
| 165 } | 166 } |
| 166 | 167 |
| 167 } // namespace crashpad | 168 } // namespace crashpad |
| OLD | NEW |