Index: chromecast/crash/cast_crash_reporter_client_uploader.cc |
diff --git a/chromecast/crash/cast_crash_reporter_client_uploader.cc b/chromecast/crash/cast_crash_reporter_client_uploader.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5943293bc9e6becc0aebabf3089bc69bafd07b0a |
--- /dev/null |
+++ b/chromecast/crash/cast_crash_reporter_client_uploader.cc |
@@ -0,0 +1,30 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chromecast/crash/cast_crash_reporter_client.h" |
+ |
+#include "chromecast/base/error_codes.h" |
+#include "chromecast/crash/breakpad_util.h" |
+ |
+namespace chromecast { |
+ |
+bool CastCrashReporterClient::HandleCrashDump(const char* crashdump_filename) { |
gunsch
2015/06/09 18:46:19
This can just get inlined into cast_crash_reporter
slan
2015/06/10 01:49:13
Done.
|
+ // Set the initial error code to ERROR_WEB_CONTENT_RENDER_VIEW_GONE to show |
+ // an error message on next cast_shell run. Though the error code is for |
+ // renderer process crash, the actual messages can be used for browser process |
+ // as well. |
+ if (!GetProcessType() || !strcmp(GetProcessType(), "browser")) |
+ SetInitialErrorCode(ERROR_WEB_CONTENT_RENDER_VIEW_GONE); |
+ |
+ // Upload crash dump. If user didn't opt-in crash report, minidump writer |
+ // instantiated within BreakpadUtil::RequestUploadCrashDump() does nothing. |
+ BreakpadUtil::RequestUploadCrashDump( |
+ crashdump_filename, GetProcessType(), GetProcessStartTime()); |
+ |
+ // Always return true to indicate that this crash dump has been processed, |
+ // so that it won't fallback to use chrome's default uploader. |
+ return true; |
+} |
+ |
+} // namespace chromecast |