Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: blimp/engine/app/blimp_engine_crash_reporter_client.h

Issue 1925993004: Initial addition of Blimp engine crash client code (take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/::crash_keys/crash_keys/ Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/engine/app/blimp_engine_crash_reporter_client.h
diff --git a/blimp/engine/app/blimp_engine_crash_reporter_client.h b/blimp/engine/app/blimp_engine_crash_reporter_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..f22bc51d9c9fb6ae815890fb26f546a3dec452da
--- /dev/null
+++ b/blimp/engine/app/blimp_engine_crash_reporter_client.h
@@ -0,0 +1,44 @@
+// Copyright 2016 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.
+
+#ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_
+#define BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_
+
+#include <stddef.h>
+
+#include <string>
+
+#include "base/macros.h"
+#include "components/crash/content/app/crash_reporter_client.h"
+
+namespace blimp {
+namespace engine {
+
+// Crash reporter client for the Blimp engine. This will always collect crash
+// reports, and will always upload reports unless running in a "headless" test
+// mode.
+// This is intended to be built with a Linux OS target only.
+class BlimpEngineCrashReporterClient
+ : public crash_reporter::CrashReporterClient {
+ public:
+ BlimpEngineCrashReporterClient();
+ ~BlimpEngineCrashReporterClient() override;
+
+ void SetCrashReporterClientIdFromGUID(
Kevin M 2016/05/02 22:05:32 private: // CrashReporterClient implementation.
marcinjb 2016/05/03 18:06:58 Done.
+ const std::string& client_guid) override;
+ void GetProductNameAndVersion(const char** product_name,
+ const char** version) override;
+ size_t RegisterCrashKeys() override;
+ bool IsRunningUnattended() override;
+ bool GetCollectStatsConsent() override;
+ bool EnableBreakpadForProcess(const std::string& process_type) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BlimpEngineCrashReporterClient);
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698