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, |
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 "client/prune_crash_reports.h" | 15 #include "client/prune_crash_reports.h" |
16 | 16 |
17 #include <sys/stat.h> | 17 #include <sys/stat.h> |
18 | 18 |
19 #include <algorithm> | 19 #include <algorithm> |
20 #include <vector> | 20 #include <vector> |
21 | 21 |
22 #include "base/logging.h" | 22 #include "base/logging.h" |
| 23 #include "build/build_config.h" |
23 | 24 |
24 namespace crashpad { | 25 namespace crashpad { |
25 | 26 |
26 void PruneCrashReportDatabase(CrashReportDatabase* database, | 27 void PruneCrashReportDatabase(CrashReportDatabase* database, |
27 PruneCondition* condition) { | 28 PruneCondition* condition) { |
28 std::vector<CrashReportDatabase::Report> all_reports; | 29 std::vector<CrashReportDatabase::Report> all_reports; |
29 CrashReportDatabase::OperationStatus status; | 30 CrashReportDatabase::OperationStatus status; |
30 | 31 |
31 status = database->GetPendingReports(&all_reports); | 32 status = database->GetPendingReports(&all_reports); |
32 if (status != CrashReportDatabase::kNoError) { | 33 if (status != CrashReportDatabase::kNoError) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return lhs_->ShouldPruneReport(report) && rhs_->ShouldPruneReport(report); | 123 return lhs_->ShouldPruneReport(report) && rhs_->ShouldPruneReport(report); |
123 case OR: | 124 case OR: |
124 return lhs_->ShouldPruneReport(report) || rhs_->ShouldPruneReport(report); | 125 return lhs_->ShouldPruneReport(report) || rhs_->ShouldPruneReport(report); |
125 default: | 126 default: |
126 NOTREACHED(); | 127 NOTREACHED(); |
127 return false; | 128 return false; |
128 } | 129 } |
129 } | 130 } |
130 | 131 |
131 } // namespace crashpad | 132 } // namespace crashpad |
OLD | NEW |