OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/crash/content/app/crashpad.h" | 5 #include "components/crash/content/app/crashpad.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 uploaded_reports->push_back(uploaded_report); | 226 uploaded_reports->push_back(uploaded_report); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 std::sort(uploaded_reports->begin(), uploaded_reports->end(), | 230 std::sort(uploaded_reports->begin(), uploaded_reports->end(), |
231 [](const UploadedReport& a, const UploadedReport& b) { | 231 [](const UploadedReport& a, const UploadedReport& b) { |
232 return a.creation_time >= b.creation_time; | 232 return a.creation_time >= b.creation_time; |
233 }); | 233 }); |
234 } | 234 } |
235 | 235 |
| 236 std::vector<std::pair<std::string, std::string>> GetCrashKeys() { |
| 237 std::vector<std::pair<std::string, std::string>> pairs; |
| 238 pairs.reserve(g_simple_string_dictionary->GetCount()); |
| 239 crashpad::SimpleStringDictionary::Iterator iter(*g_simple_string_dictionary); |
| 240 for (;;) { |
| 241 const auto* entry = iter.Next(); |
| 242 if (!entry) |
| 243 break; |
| 244 pairs.push_back(std::make_pair(entry->key, entry->value)); |
| 245 } |
| 246 return pairs; |
| 247 } |
| 248 |
236 } // namespace crash_reporter | 249 } // namespace crash_reporter |
OLD | NEW |