Chromium Code Reviews| 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 <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 | 15 |
| 16 #if defined(OS_MACOSX) | |
|
Mark Mentovai
2017/03/14 23:24:52
#include "build/build_config.h" first (this file s
Robert Sesek
2017/03/15 19:22:09
Done.
| |
| 17 #include "base/mac/scoped_mach_port.h" | |
| 18 #endif | |
| 19 | |
| 16 namespace crash_reporter { | 20 namespace crash_reporter { |
| 17 | 21 |
| 18 // Initializes Crashpad in a way that is appropriate for initial_client and | 22 // Initializes Crashpad in a way that is appropriate for initial_client and |
| 19 // process_type. | 23 // process_type. |
| 20 // | 24 // |
| 21 // If initial_client is true, this starts crashpad_handler and sets it as the | 25 // If initial_client is true, this starts crashpad_handler and sets it as the |
| 22 // exception handler. Child processes will inherit this exception handler, and | 26 // exception handler. Child processes will inherit this exception handler, and |
| 23 // should specify false for this parameter. Although they inherit the exception | 27 // should specify false for this parameter. Although they inherit the exception |
| 24 // handler, child processes still need to call this function to perform | 28 // handler, child processes still need to call this function to perform |
| 25 // additional initialization. | 29 // additional initialization. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // Obtains a list of reports uploaded to the collection server. This function | 91 // Obtains a list of reports uploaded to the collection server. This function |
| 88 // only operates when called in the browser process. All reports in the Crashpad | 92 // only operates when called in the browser process. All reports in the Crashpad |
| 89 // database that have been successfully uploaded will be included in this list. | 93 // database that have been successfully uploaded will be included in this list. |
| 90 // The list will be sorted in descending order by report creation time (newest | 94 // The list will be sorted in descending order by report creation time (newest |
| 91 // reports first). | 95 // reports first). |
| 92 void GetReports(std::vector<Report>* reports); | 96 void GetReports(std::vector<Report>* reports); |
| 93 | 97 |
| 94 // Requests a user triggered upload for a crash report with a given id. | 98 // Requests a user triggered upload for a crash report with a given id. |
| 95 void RequestSingleCrashUpload(const std::string& local_id); | 99 void RequestSingleCrashUpload(const std::string& local_id); |
| 96 | 100 |
| 101 #if defined(OS_MACOSX) | |
| 102 // After Crashpad is initialized, returns a new send right to the handler's | |
| 103 // Mach port. | |
| 104 base::mac::ScopedMachSendRight GetHandlerMachPort(); | |
| 105 #endif | |
| 106 | |
| 97 namespace internal { | 107 namespace internal { |
| 98 | 108 |
| 99 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
| 100 // Returns platform specific annotations. This is broken out on Windows only so | 110 // Returns platform specific annotations. This is broken out on Windows only so |
| 101 // that it may be reused by GetCrashKeysForKasko. | 111 // that it may be reused by GetCrashKeysForKasko. |
| 102 void GetPlatformCrashpadAnnotations( | 112 void GetPlatformCrashpadAnnotations( |
| 103 std::map<std::string, std::string>* annotations); | 113 std::map<std::string, std::string>* annotations); |
| 104 #endif // defined(OS_WIN) | 114 #endif // defined(OS_WIN) |
| 105 | 115 |
| 106 // The platform-specific portion of InitializeCrashpad(). | 116 // The platform-specific portion of InitializeCrashpad(). |
| 107 // Returns the database path, if initializing in the browser process. | 117 // Returns the database path, if initializing in the browser process. |
| 108 base::FilePath PlatformCrashpadInitialization(bool initial_client, | 118 base::FilePath PlatformCrashpadInitialization(bool initial_client, |
| 109 bool browser_process, | 119 bool browser_process, |
| 110 bool embedded_handler); | 120 bool embedded_handler); |
| 111 | 121 |
| 112 } // namespace internal | 122 } // namespace internal |
| 113 | 123 |
| 114 } // namespace crash_reporter | 124 } // namespace crash_reporter |
| 115 | 125 |
| 116 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 126 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| OLD | NEW |