| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void InitializeCrashpad(bool initial_client, const std::string& process_type); | 54 void InitializeCrashpad(bool initial_client, const std::string& process_type); |
| 55 | 55 |
| 56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
| 57 // This is the same as InitializeCrashpad(), but rather than launching a | 57 // This is the same as InitializeCrashpad(), but rather than launching a |
| 58 // crashpad_handler executable, relaunches the current executable with a command | 58 // crashpad_handler executable, relaunches the current executable with a command |
| 59 // line argument of --type=crashpad-handler. | 59 // line argument of --type=crashpad-handler. |
| 60 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, | 60 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, |
| 61 const std::string& process_type); | 61 const std::string& process_type); |
| 62 #endif // OS_WIN | 62 #endif // OS_WIN |
| 63 | 63 |
| 64 // Enables or disables crash report upload. This is a property of the Crashpad | 64 // Enables or disables crash report upload, taking the given consent to upload |
| 65 // database. In a newly-created database, uploads will be disabled. This | 65 // into account. Consent may be ignored, uploads may not be enabled even with |
| 66 // function only has an effect when called in the browser process. Its effect is | 66 // consent, but will only be enabled without consent when policy enforces crash |
| 67 // immediate and applies to all other process types, including processes that | 67 // reporting. Whether reports upload is a property of the Crashpad database. In |
| 68 // are already running. | 68 // a newly-created database, uploads will be disabled. This function only has an |
| 69 void SetUploadsEnabled(bool enabled); | 69 // effect when called in the browser process. Its effect is immediate and |
| 70 // applies to all other process types, including processes that are already |
| 71 // running. |
| 72 void SetUploadConsent(bool consent); |
| 70 | 73 |
| 71 // Determines whether uploads are enabled or disabled. This information is only | 74 // Determines whether uploads are enabled or disabled. This information is only |
| 72 // available in the browser process. | 75 // available in the browser process. |
| 73 bool GetUploadsEnabled(); | 76 bool GetUploadsEnabled(); |
| 74 | 77 |
| 75 enum class ReportUploadState { | 78 enum class ReportUploadState { |
| 76 NotUploaded, | 79 NotUploaded, |
| 77 Pending, | 80 Pending, |
| 78 Uploaded, | 81 Uploaded, |
| 79 }; | 82 }; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Returns the database path, if initializing in the browser process. | 120 // Returns the database path, if initializing in the browser process. |
| 118 base::FilePath PlatformCrashpadInitialization(bool initial_client, | 121 base::FilePath PlatformCrashpadInitialization(bool initial_client, |
| 119 bool browser_process, | 122 bool browser_process, |
| 120 bool embedded_handler); | 123 bool embedded_handler); |
| 121 | 124 |
| 122 } // namespace internal | 125 } // namespace internal |
| 123 | 126 |
| 124 } // namespace crash_reporter | 127 } // namespace crash_reporter |
| 125 | 128 |
| 126 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 129 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| OLD | NEW |