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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 ReportDisk::ReportDisk(const MetadataFileReportRecord& record, | 153 ReportDisk::ReportDisk(const MetadataFileReportRecord& record, |
154 const base::FilePath& report_dir, | 154 const base::FilePath& report_dir, |
155 const std::string& string_table) | 155 const std::string& string_table) |
156 : Report() { | 156 : Report() { |
157 uuid = record.uuid; | 157 uuid = record.uuid; |
158 file_path = report_dir.Append( | 158 file_path = report_dir.Append( |
159 base::UTF8ToUTF16(&string_table[record.file_path_index])); | 159 base::UTF8ToUTF16(&string_table[record.file_path_index])); |
160 id = &string_table[record.id_index]; | 160 id = &string_table[record.id_index]; |
161 creation_time = record.creation_time; | 161 creation_time = record.creation_time; |
162 uploaded = record.uploaded; | 162 uploaded = record.uploaded != 0; |
163 last_upload_attempt_time = record.last_upload_attempt_time; | 163 last_upload_attempt_time = record.last_upload_attempt_time; |
164 upload_attempts = record.upload_attempts; | 164 upload_attempts = record.upload_attempts; |
165 state = static_cast<ReportState>(record.state); | 165 state = static_cast<ReportState>(record.state); |
166 } | 166 } |
167 | 167 |
168 ReportDisk::ReportDisk(const UUID& uuid, | 168 ReportDisk::ReportDisk(const UUID& uuid, |
169 const base::FilePath& path, | 169 const base::FilePath& path, |
170 time_t creation_time, | 170 time_t creation_time, |
171 ReportState state) | 171 ReportState state) |
172 : Report() { | 172 : Report() { |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 return InitializeInternal(path, true); | 827 return InitializeInternal(path, true); |
828 } | 828 } |
829 | 829 |
830 // static | 830 // static |
831 scoped_ptr<CrashReportDatabase> CrashReportDatabase::InitializeWithoutCreating( | 831 scoped_ptr<CrashReportDatabase> CrashReportDatabase::InitializeWithoutCreating( |
832 const base::FilePath& path) { | 832 const base::FilePath& path) { |
833 return InitializeInternal(path, false); | 833 return InitializeInternal(path, false); |
834 } | 834 } |
835 | 835 |
836 } // namespace crashpad | 836 } // namespace crashpad |
OLD | NEW |