2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
2022-04-27 21:24:24 +02:00
|
|
|
index 3e92f06c8b3b4..74b4bf290dd0c 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
|
|
|
+++ third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -75,13 +75,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database,
|
2016-12-12 11:05:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
-std::unique_ptr<PruneCondition> PruneCondition::GetDefault() {
|
|
|
|
+std::unique_ptr<PruneCondition> PruneCondition::GetDefault(
|
|
|
|
+ int max_size_in_mb,
|
|
|
|
+ int max_age_in_days) {
|
|
|
|
// DatabaseSizePruneCondition must be the LHS so that it is always evaluated,
|
|
|
|
// due to the short-circuting behavior of BinaryPruneCondition.
|
|
|
|
+ if (max_size_in_mb <= 0)
|
|
|
|
+ max_size_in_mb = 128;
|
|
|
|
+ if (max_age_in_days <= 0)
|
|
|
|
+ max_age_in_days = 365;
|
2017-12-07 22:44:24 +01:00
|
|
|
return std::make_unique<BinaryPruneCondition>(
|
|
|
|
BinaryPruneCondition::OR,
|
|
|
|
- new DatabaseSizePruneCondition(1024 * 128),
|
|
|
|
- new AgePruneCondition(365));
|
|
|
|
+ new DatabaseSizePruneCondition(1024 * max_size_in_mb),
|
|
|
|
+ new AgePruneCondition(max_age_in_days));
|
2016-12-12 11:05:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static const time_t kSecondsInDay = 60 * 60 * 24;
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h
|
2022-04-27 21:24:24 +02:00
|
|
|
index f121a2b07cdbd..b2e9bedac39d3 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/client/prune_crash_reports.h
|
|
|
|
+++ third_party/crashpad/crashpad/client/prune_crash_reports.h
|
2021-10-19 00:17:16 +02:00
|
|
|
@@ -58,7 +58,8 @@ class PruneCondition {
|
2016-12-12 11:05:29 +01:00
|
|
|
//! of 128 MB.
|
|
|
|
//!
|
|
|
|
//! \return A PruneCondition for use with PruneCrashReportDatabase().
|
|
|
|
- static std::unique_ptr<PruneCondition> GetDefault();
|
|
|
|
+ static std::unique_ptr<PruneCondition> GetDefault(int max_size_in_mb,
|
|
|
|
+ int max_age_in_days);
|
|
|
|
|
|
|
|
virtual ~PruneCondition() {}
|
|
|
|
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
|
2022-04-27 21:24:24 +02:00
|
|
|
index 8fe578f92f3a3..9acab9404c885 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/client/settings.cc
|
|
|
|
+++ third_party/crashpad/crashpad/client/settings.cc
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -111,7 +111,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
2016-12-12 11:05:29 +01:00
|
|
|
|
|
|
|
struct Settings::Data {
|
2020-06-09 19:48:00 +02:00
|
|
|
static constexpr uint32_t kSettingsMagic = 'CPds';
|
|
|
|
- static constexpr uint32_t kSettingsVersion = 1;
|
|
|
|
+ static constexpr uint32_t kSettingsVersion = 2;
|
2016-12-12 11:05:29 +01:00
|
|
|
|
|
|
|
enum Options : uint32_t {
|
|
|
|
kUploadsEnabled = 1 << 0,
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -122,6 +122,9 @@ struct Settings::Data {
|
2016-12-12 11:05:29 +01:00
|
|
|
options(0),
|
|
|
|
padding_0(0),
|
|
|
|
last_upload_attempt_time(0),
|
|
|
|
+ next_upload_attempt_time(0),
|
|
|
|
+ backoff_step(0),
|
|
|
|
+ padding_1(0),
|
|
|
|
client_id() {}
|
|
|
|
|
|
|
|
uint32_t magic;
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -129,6 +132,9 @@ struct Settings::Data {
|
2016-12-12 11:05:29 +01:00
|
|
|
uint32_t options;
|
|
|
|
uint32_t padding_0;
|
2017-01-23 18:36:54 +01:00
|
|
|
int64_t last_upload_attempt_time; // time_t
|
|
|
|
+ int64_t next_upload_attempt_time; // time_t
|
2016-12-12 11:05:29 +01:00
|
|
|
+ uint32_t backoff_step;
|
|
|
|
+ uint32_t padding_1;
|
|
|
|
UUID client_id;
|
|
|
|
};
|
|
|
|
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -212,6 +218,56 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
|
2016-12-12 11:05:29 +01:00
|
|
|
return WriteSettings(handle.get(), settings);
|
|
|
|
}
|
|
|
|
|
|
|
|
+bool Settings::GetNextUploadAttemptTime(time_t* time) {
|
|
|
|
+ DCHECK(initialized_.is_valid());
|
|
|
|
+
|
|
|
|
+ Data settings;
|
|
|
|
+ if (!OpenAndReadSettings(&settings))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ *time = InRangeCast<time_t>(settings.next_upload_attempt_time,
|
|
|
|
+ std::numeric_limits<time_t>::max());
|
|
|
|
+ return true;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool Settings::SetNextUploadAttemptTime(time_t time) {
|
|
|
|
+ DCHECK(initialized_.is_valid());
|
|
|
|
+
|
|
|
|
+ Data settings;
|
|
|
|
+ ScopedLockedFileHandle handle = OpenForWritingAndReadSettings(&settings);
|
|
|
|
+ if (!handle.is_valid())
|
|
|
|
+ return false;
|
|
|
|
+
|
2017-01-23 18:36:54 +01:00
|
|
|
+ settings.next_upload_attempt_time = InRangeCast<int64_t>(time, 0);
|
2016-12-12 11:05:29 +01:00
|
|
|
+
|
|
|
|
+ return WriteSettings(handle.get(), settings);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool Settings::GetBackoffStep(int* step) {
|
|
|
|
+ DCHECK(initialized_.is_valid());
|
|
|
|
+
|
|
|
|
+ Data settings;
|
|
|
|
+ if (!OpenAndReadSettings(&settings))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ *step = InRangeCast<int>(settings.backoff_step,
|
|
|
|
+ std::numeric_limits<int>::max());
|
|
|
|
+ return true;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool Settings::SetBackoffStep(int step) {
|
|
|
|
+ DCHECK(initialized_.is_valid());
|
|
|
|
+
|
|
|
|
+ Data settings;
|
|
|
|
+ ScopedLockedFileHandle handle = OpenForWritingAndReadSettings(&settings);
|
|
|
|
+ if (!handle.is_valid())
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ settings.backoff_step = InRangeCast<uint32_t>(step, 0);
|
|
|
|
+
|
|
|
|
+ return WriteSettings(handle.get(), settings);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
// static
|
|
|
|
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
|
|
|
|
FileHandle file,
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h
|
2022-04-27 21:24:24 +02:00
|
|
|
index aedf30cd874f7..ab798f00e0862 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/client/settings.h
|
|
|
|
+++ third_party/crashpad/crashpad/client/settings.h
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -120,6 +120,11 @@ class Settings {
|
2016-12-12 11:05:29 +01:00
|
|
|
//! error logged.
|
|
|
|
bool SetLastUploadAttemptTime(time_t time);
|
|
|
|
|
|
|
|
+ bool GetNextUploadAttemptTime(time_t* time);
|
|
|
|
+ bool SetNextUploadAttemptTime(time_t time);
|
|
|
|
+ bool GetBackoffStep(int* step);
|
|
|
|
+ bool SetBackoffStep(int step);
|
|
|
|
+
|
|
|
|
private:
|
|
|
|
struct Data;
|
|
|
|
|
2017-12-07 22:44:24 +01:00
|
|
|
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
2021-12-16 23:35:54 +01:00
|
|
|
index 0fe4760db7fe2..042af7247712c 100644
|
2017-12-07 22:44:24 +01:00
|
|
|
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
|
|
|
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
|
|
|
@@ -12,6 +12,7 @@
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
+import("//cef/libcef/features/features.gni")
|
2018-02-15 01:12:09 +01:00
|
|
|
import("../build/crashpad_buildconfig.gni")
|
2017-12-07 22:44:24 +01:00
|
|
|
|
2020-12-02 23:31:49 +01:00
|
|
|
static_library("handler") {
|
2021-06-04 03:34:56 +02:00
|
|
|
@@ -58,6 +59,17 @@ static_library("handler") {
|
2018-11-03 02:15:09 +01:00
|
|
|
]
|
|
|
|
}
|
2017-12-07 22:44:24 +01:00
|
|
|
|
|
|
|
+ if (enable_cef) {
|
|
|
|
+ sources += [
|
|
|
|
+ "//cef/libcef/common/cef_crash_report_upload_thread.cc",
|
|
|
|
+ "//cef/libcef/common/cef_crash_report_upload_thread.h",
|
2018-02-15 01:12:09 +01:00
|
|
|
+ "//cef/libcef/common/cef_crash_report_utils.cc",
|
|
|
|
+ "//cef/libcef/common/cef_crash_report_utils.h",
|
2017-12-07 22:44:24 +01:00
|
|
|
+ ]
|
|
|
|
+
|
|
|
|
+ configs += [ "//cef/libcef/features:config" ]
|
|
|
|
+ }
|
|
|
|
+
|
2018-11-03 02:15:09 +01:00
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
|
|
|
|
public_deps = [
|
2021-06-04 03:34:56 +02:00
|
|
|
@@ -73,6 +85,7 @@ static_library("handler") {
|
2018-11-03 02:15:09 +01:00
|
|
|
"../snapshot",
|
2021-01-28 00:13:12 +01:00
|
|
|
"../third_party/mini_chromium:chromeos_buildflags",
|
2018-11-03 02:15:09 +01:00
|
|
|
"../tools:tool_support",
|
|
|
|
+ "//cef/libcef/features",
|
|
|
|
]
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
if (crashpad_is_win) {
|
|
|
|
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
2022-04-27 21:24:24 +02:00
|
|
|
index 138cf80026c98..d4af1f0c38d76 100644
|
2018-02-15 01:12:09 +01:00
|
|
|
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
|
|
|
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
2022-03-26 02:12:30 +01:00
|
|
|
@@ -269,6 +269,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
2018-04-19 17:44:42 +02:00
|
|
|
if (minidump_process_snapshot.Initialize(reader)) {
|
2018-02-15 01:12:09 +01:00
|
|
|
parameters =
|
|
|
|
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
|
|
|
|
+ if (!parameters.empty())
|
|
|
|
+ parameters = FilterParameters(parameters);
|
|
|
|
}
|
|
|
|
|
2018-04-19 17:44:42 +02:00
|
|
|
if (!reader->SeekSet(start_offset)) {
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
2022-04-21 20:58:48 +02:00
|
|
|
index 2af958d7da9e5..6a67185a668af 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
|
|
|
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
2018-02-15 01:12:09 +01:00
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
#ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
|
|
|
|
#define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
|
|
|
|
|
|
|
|
+#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2021-12-16 23:35:54 +01:00
|
|
|
#include <unordered_map>
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -111,7 +112,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
|
|
|
//! \return `true` if the thread is running, `false` if it is not.
|
|
|
|
bool is_running() const { return thread_.is_running(); }
|
2016-12-12 11:05:29 +01:00
|
|
|
|
|
|
|
- private:
|
|
|
|
+ protected:
|
|
|
|
//! \brief The result code from UploadReport().
|
|
|
|
enum class UploadResult {
|
|
|
|
//! \brief The crash report was uploaded successfully.
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -139,7 +140,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
2017-05-31 17:33:30 +02:00
|
|
|
//! object was constructed with \a watch_pending_reports, it will also scan
|
|
|
|
//! the crash report database for other pending reports, and process those as
|
|
|
|
//! well.
|
2016-12-12 11:05:29 +01:00
|
|
|
- void ProcessPendingReports();
|
|
|
|
+ virtual void ProcessPendingReports();
|
|
|
|
|
|
|
|
//! \brief Processes a single pending report from the database.
|
|
|
|
//!
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -153,7 +154,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
2016-12-12 11:05:29 +01:00
|
|
|
//! remain in the “pending” state. If the upload fails and no more retries are
|
|
|
|
//! desired, or report upload is disabled, it will be marked as “completed” in
|
|
|
|
//! the database without ever having been uploaded.
|
|
|
|
- void ProcessPendingReport(const CrashReportDatabase::Report& report);
|
|
|
|
+ virtual void ProcessPendingReport(const CrashReportDatabase::Report& report);
|
|
|
|
|
|
|
|
//! \brief Attempts to upload a crash report.
|
|
|
|
//!
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -170,6 +171,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
2018-04-19 17:44:42 +02:00
|
|
|
UploadResult UploadReport(const CrashReportDatabase::UploadReport* report,
|
2018-02-15 01:12:09 +01:00
|
|
|
std::string* response_body);
|
|
|
|
|
|
|
|
+ using ParameterMap = std::map<std::string, std::string>;
|
|
|
|
+ virtual ParameterMap FilterParameters(const ParameterMap& parameters) {
|
|
|
|
+ return parameters;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
// WorkerThread::Delegate:
|
|
|
|
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
|
|
|
|
//! been called on any thread, as well as periodically on a timer.
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
2022-02-21 23:23:40 +01:00
|
|
|
index 48ef8b6530a67..dbe2916492ff7 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
|
|
|
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -39,6 +39,7 @@
|
2016-12-12 11:05:29 +01:00
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
|
#include "build/build_config.h"
|
2020-12-02 23:31:49 +01:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2016-12-12 11:05:29 +01:00
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
#include "client/crash_report_database.h"
|
|
|
|
#include "client/crashpad_client.h"
|
2017-04-20 21:28:17 +02:00
|
|
|
#include "client/crashpad_info.h"
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -89,6 +90,10 @@
|
2020-10-08 21:54:42 +02:00
|
|
|
#include "util/win/session_end_watcher.h"
|
2022-01-25 21:26:51 +01:00
|
|
|
#endif // BUILDFLAG(IS_APPLE)
|
2016-12-12 11:05:29 +01:00
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+#include "cef/libcef/common/cef_crash_report_upload_thread.h"
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
namespace crashpad {
|
|
|
|
|
|
|
|
namespace {
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -248,6 +253,9 @@ struct Options {
|
2017-05-31 17:33:30 +02:00
|
|
|
bool periodic_tasks;
|
2017-04-20 21:28:17 +02:00
|
|
|
bool rate_limit;
|
|
|
|
bool upload_gzip;
|
|
|
|
+ int max_uploads;
|
|
|
|
+ int max_database_size;
|
|
|
|
+ int max_database_age;
|
2021-01-28 00:13:12 +01:00
|
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
2020-03-04 01:29:39 +01:00
|
|
|
bool use_cros_crash_reporter = false;
|
2019-11-12 17:11:44 +01:00
|
|
|
base::FilePath minidump_dir_for_tests;
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -617,6 +625,9 @@ int HandlerMain(int argc,
|
2019-07-16 19:59:21 +02:00
|
|
|
kOptionTraceParentWithException,
|
2018-04-19 17:44:42 +02:00
|
|
|
#endif
|
2016-12-12 11:05:29 +01:00
|
|
|
kOptionURL,
|
|
|
|
+ kOptionMaxUploads,
|
|
|
|
+ kOptionMaxDatabaseSize,
|
|
|
|
+ kOptionMaxDatabaseAge,
|
2021-01-28 00:13:12 +01:00
|
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
2019-10-01 15:55:16 +02:00
|
|
|
kOptionUseCrosCrashReporter,
|
2019-11-12 17:11:44 +01:00
|
|
|
kOptionMinidumpDirForTests,
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -717,6 +728,9 @@ int HandlerMain(int argc,
|
2022-01-25 21:26:51 +01:00
|
|
|
#endif // BUILDFLAG(IS_ANDROID)
|
2016-12-12 11:05:29 +01:00
|
|
|
{"help", no_argument, nullptr, kOptionHelp},
|
|
|
|
{"version", no_argument, nullptr, kOptionVersion},
|
|
|
|
+ {"max-uploads", required_argument, nullptr, kOptionMaxUploads},
|
|
|
|
+ {"max-db-size", required_argument, nullptr, kOptionMaxDatabaseSize},
|
|
|
|
+ {"max-db-age", required_argument, nullptr, kOptionMaxDatabaseAge},
|
|
|
|
{nullptr, 0, nullptr, 0},
|
|
|
|
};
|
|
|
|
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -874,6 +888,27 @@ int HandlerMain(int argc,
|
2016-12-12 11:05:29 +01:00
|
|
|
options.url = optarg;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
+ case kOptionMaxUploads: {
|
|
|
|
+ if (base::StringToInt(optarg, &options.max_uploads)) {
|
|
|
|
+ if (options.max_uploads < 0)
|
|
|
|
+ options.max_uploads = 0;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ case kOptionMaxDatabaseSize: {
|
|
|
|
+ if (base::StringToInt(optarg, &options.max_database_size)) {
|
|
|
|
+ if (options.max_database_size < 0)
|
|
|
|
+ options.max_database_size = 0;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ case kOptionMaxDatabaseAge: {
|
|
|
|
+ if (base::StringToInt(optarg, &options.max_database_age)) {
|
|
|
|
+ if (options.max_database_age < 0)
|
|
|
|
+ options.max_database_age = 0;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
2021-01-28 00:13:12 +01:00
|
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
2019-10-01 15:55:16 +02:00
|
|
|
case kOptionUseCrosCrashReporter: {
|
|
|
|
options.use_cros_crash_reporter = true;
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -1023,8 +1058,14 @@ int HandlerMain(int argc,
|
2018-04-19 17:44:42 +02:00
|
|
|
upload_thread_options.upload_gzip = options.upload_gzip;
|
|
|
|
upload_thread_options.watch_pending_reports = options.periodic_tasks;
|
|
|
|
|
2016-12-12 11:05:29 +01:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2018-04-19 17:44:42 +02:00
|
|
|
+ upload_thread.Reset(new CefCrashReportUploadThread(
|
|
|
|
+ database.get(), options.url, upload_thread_options,
|
|
|
|
+ options.max_uploads));
|
2016-12-12 11:05:29 +01:00
|
|
|
+#else
|
2018-04-19 17:44:42 +02:00
|
|
|
upload_thread.Reset(new CrashReportUploadThread(
|
|
|
|
database.get(), options.url, upload_thread_options));
|
2016-12-12 11:05:29 +01:00
|
|
|
+#endif
|
2018-04-19 17:44:42 +02:00
|
|
|
upload_thread.Get()->Start();
|
|
|
|
}
|
2016-12-12 11:05:29 +01:00
|
|
|
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -1095,7 +1136,8 @@ int HandlerMain(int argc,
|
2018-04-19 17:44:42 +02:00
|
|
|
ScopedStoppable prune_thread;
|
2017-05-31 17:33:30 +02:00
|
|
|
if (options.periodic_tasks) {
|
2018-04-19 17:44:42 +02:00
|
|
|
prune_thread.Reset(new PruneCrashReportThread(
|
2017-05-31 17:33:30 +02:00
|
|
|
- database.get(), PruneCondition::GetDefault()));
|
|
|
|
+ database.get(), PruneCondition::GetDefault(options.max_database_size,
|
|
|
|
+ options.max_database_age)));
|
2018-04-19 17:44:42 +02:00
|
|
|
prune_thread.Get()->Start();
|
2017-05-31 17:33:30 +02:00
|
|
|
}
|
2016-12-12 11:05:29 +01:00
|
|
|
|