| 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 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| 7 | 7 |
| 8 #include <time.h> | 8 #include <time.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 14 | 15 |
| 15 namespace crash_reporter { | 16 namespace crash_reporter { |
| 16 | 17 |
| 17 // Initializes Crashpad in a way that is appropriate for initial_client and | 18 // Initializes Crashpad in a way that is appropriate for initial_client and |
| 18 // process_type. | 19 // process_type. |
| 19 // | 20 // |
| 20 // If initial_client is true, this starts crashpad_handler and sets it as the | 21 // If initial_client is true, this starts crashpad_handler and sets it as the |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // The list will be sorted in descending order by report creation time (newest | 64 // The list will be sorted in descending order by report creation time (newest |
| 64 // reports first). | 65 // reports first). |
| 65 // | 66 // |
| 66 // TODO(mark): The about:crashes UI expects to show only uploaded reports. If it | 67 // TODO(mark): The about:crashes UI expects to show only uploaded reports. If it |
| 67 // is ever enhanced to work well with un-uploaded reports, those should be | 68 // is ever enhanced to work well with un-uploaded reports, those should be |
| 68 // returned as well. Un-uploaded reports may have a pending upload, may have | 69 // returned as well. Un-uploaded reports may have a pending upload, may have |
| 69 // experienced upload failure, or may have been collected while uploads were | 70 // experienced upload failure, or may have been collected while uploads were |
| 70 // disabled. | 71 // disabled. |
| 71 void GetUploadedReports(std::vector<UploadedReport>* uploaded_reports); | 72 void GetUploadedReports(std::vector<UploadedReport>* uploaded_reports); |
| 72 | 73 |
| 74 // Returns a copy of the current crash keys. |
| 75 std::vector<std::pair<std::string, std::string>> GetCrashKeys(); |
| 76 |
| 73 namespace internal { | 77 namespace internal { |
| 74 | 78 |
| 75 // The platform-specific portion of InitializeCrashpad(). | 79 // The platform-specific portion of InitializeCrashpad(). |
| 76 // Returns the database path, if initializing in the browser process. | 80 // Returns the database path, if initializing in the browser process. |
| 77 base::FilePath PlatformCrashpadInitialization(bool initial_client, | 81 base::FilePath PlatformCrashpadInitialization(bool initial_client, |
| 78 bool browser_process); | 82 bool browser_process); |
| 79 | 83 |
| 80 } // namespace internal | 84 } // namespace internal |
| 81 | 85 |
| 82 } // namespace crash_reporter | 86 } // namespace crash_reporter |
| 83 | 87 |
| 84 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 88 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| OLD | NEW |