Chromium Code Reviews| Index: blimp/engine/app/blimp_engine_crash_reporter_client.cc |
| diff --git a/blimp/engine/app/blimp_engine_crash_reporter_client.cc b/blimp/engine/app/blimp_engine_crash_reporter_client.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b12c0a7b67f9375e76a2cb6c1eec32d6b58a04da |
| --- /dev/null |
| +++ b/blimp/engine/app/blimp_engine_crash_reporter_client.cc |
| @@ -0,0 +1,56 @@ |
| +// 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. |
| + |
| +#include "blimp/engine/app/blimp_engine_crash_reporter_client.h" |
| + |
| +#include "blimp/engine/app/blimp_engine_crash_keys.h" |
| +#include "components/crash/core/common/crash_keys.h" |
| +#include "components/version_info/version_info_values.h" |
| +#include "content/public/common/content_switches.h" |
| + |
| +namespace blimp { |
| +namespace engine { |
| + |
| +BlimpEngineCrashReporterClient::BlimpEngineCrashReporterClient() {} |
| +BlimpEngineCrashReporterClient::~BlimpEngineCrashReporterClient() {} |
| + |
| +void BlimpEngineCrashReporterClient::SetCrashReporterClientIdFromGUID( |
| + const std::string& client_guid) { |
| + ::crash_keys::SetMetricsClientIdFromGUID(client_guid); |
| +} |
| + |
| +void BlimpEngineCrashReporterClient::GetProductNameAndVersion( |
| + const char** product_name, |
| + const char** version) { |
| + *product_name = "Chrome_Blimp_Engine"; |
|
Kevin M
2016/05/03 20:06:13
Make this a kConstant
marcinjb
2016/05/03 22:06:31
Done.
|
| + *version = PRODUCT_VERSION; |
| +} |
| + |
| +size_t BlimpEngineCrashReporterClient::RegisterCrashKeys() { |
| + return RegisterEngineCrashKeys(); |
| +} |
| + |
| +bool BlimpEngineCrashReporterClient::IsRunningUnattended() { |
| + // If this returns "true," crash reports will not be uploaded. For now the |
| + // engine will not be running unattended. Eventually when automated testing |
| + // harnesses are set up, this should be changed to return "true" in those |
| + // cases. |
| + return false; |
| +} |
| + |
| +bool BlimpEngineCrashReporterClient::GetCollectStatsConsent() { |
| + // Always collect Blimp engine crash reports. |
| + return true; |
| +} |
| + |
| +bool BlimpEngineCrashReporterClient::EnableBreakpadForProcess( |
| + const std::string& process_type) { |
| + return process_type == ::switches::kRendererProcess || |
| + process_type == ::switches::kPpapiPluginProcess || |
| + process_type == ::switches::kZygoteProcess || |
| + process_type == ::switches::kGpuProcess; |
| +} |
| + |
| +} // namespace engine |
| +} // namespace blimp |