| 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> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // and will launch an external crashpad_handler.exe which is generally used for | 46 // and will launch an external crashpad_handler.exe which is generally used for |
| 47 // test situations. | 47 // test situations. |
| 48 void InitializeCrashpad(bool initial_client, const std::string& process_type); | 48 void InitializeCrashpad(bool initial_client, const std::string& process_type); |
| 49 | 49 |
| 50 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
| 51 // This is the same as InitializeCrashpad(), but rather than launching a | 51 // This is the same as InitializeCrashpad(), but rather than launching a |
| 52 // crashpad_handler executable, relaunches the current executable with a command | 52 // crashpad_handler executable, relaunches the current executable with a command |
| 53 // line argument of --type=crashpad-handler. | 53 // line argument of --type=crashpad-handler. |
| 54 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, | 54 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, |
| 55 const std::string& process_type); | 55 const std::string& process_type); |
| 56 | |
| 57 // Waits until the handler has successfully completed startup or failed, and | |
| 58 // logs an error in that case. | |
| 59 void BlockUntilHandlerStarted(); | |
| 60 #endif // OS_WIN | 56 #endif // OS_WIN |
| 61 | 57 |
| 62 // Enables or disables crash report upload, taking the given consent to upload | 58 // Enables or disables crash report upload, taking the given consent to upload |
| 63 // into account. Consent may be ignored, uploads may not be enabled even with | 59 // into account. Consent may be ignored, uploads may not be enabled even with |
| 64 // consent, but will only be enabled without consent when policy enforces crash | 60 // consent, but will only be enabled without consent when policy enforces crash |
| 65 // reporting. Whether reports upload is a property of the Crashpad database. In | 61 // reporting. Whether reports upload is a property of the Crashpad database. In |
| 66 // a newly-created database, uploads will be disabled. This function only has an | 62 // a newly-created database, uploads will be disabled. This function only has an |
| 67 // effect when called in the browser process. Its effect is immediate and | 63 // effect when called in the browser process. Its effect is immediate and |
| 68 // applies to all other process types, including processes that are already | 64 // applies to all other process types, including processes that are already |
| 69 // running. | 65 // running. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Returns the database path, if initializing in the browser process. | 107 // Returns the database path, if initializing in the browser process. |
| 112 base::FilePath PlatformCrashpadInitialization(bool initial_client, | 108 base::FilePath PlatformCrashpadInitialization(bool initial_client, |
| 113 bool browser_process, | 109 bool browser_process, |
| 114 bool embedded_handler); | 110 bool embedded_handler); |
| 115 | 111 |
| 116 } // namespace internal | 112 } // namespace internal |
| 117 | 113 |
| 118 } // namespace crash_reporter | 114 } // namespace crash_reporter |
| 119 | 115 |
| 120 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 116 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| OLD | NEW |