OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "blimp/engine/app/blimp_engine_crash_reporter_client.h" |
| 6 |
| 7 #include "blimp/engine/app/blimp_engine_crash_keys.h" |
| 8 #include "components/crash/core/common/crash_keys.h" |
| 9 #include "components/version_info/version_info_values.h" |
| 10 #include "content/public/common/content_switches.h" |
| 11 |
| 12 namespace blimp { |
| 13 namespace engine { |
| 14 |
| 15 namespace { |
| 16 // The product name that will be reported to breakpad. |
| 17 const char kProductName[] = "Chrome_Blimp_Engine"; |
| 18 } // namespace |
| 19 |
| 20 BlimpEngineCrashReporterClient::BlimpEngineCrashReporterClient() {} |
| 21 BlimpEngineCrashReporterClient::~BlimpEngineCrashReporterClient() {} |
| 22 |
| 23 void BlimpEngineCrashReporterClient::SetCrashReporterClientIdFromGUID( |
| 24 const std::string& client_guid) { |
| 25 ::crash_keys::SetMetricsClientIdFromGUID(client_guid); |
| 26 } |
| 27 |
| 28 void BlimpEngineCrashReporterClient::GetProductNameAndVersion( |
| 29 const char** product_name, |
| 30 const char** version) { |
| 31 *product_name = kProductName; |
| 32 *version = PRODUCT_VERSION; |
| 33 } |
| 34 |
| 35 size_t BlimpEngineCrashReporterClient::RegisterCrashKeys() { |
| 36 return RegisterEngineCrashKeys(); |
| 37 } |
| 38 |
| 39 bool BlimpEngineCrashReporterClient::IsRunningUnattended() { |
| 40 // If this returns "true," crash reports will not be uploaded. For now the |
| 41 // engine will not be running unattended. Eventually when automated testing |
| 42 // harnesses are set up, this should be changed to return "true" in those |
| 43 // cases. |
| 44 return false; |
| 45 } |
| 46 |
| 47 bool BlimpEngineCrashReporterClient::GetCollectStatsConsent() { |
| 48 // Always collect Blimp engine crash reports. |
| 49 return true; |
| 50 } |
| 51 |
| 52 bool BlimpEngineCrashReporterClient::EnableBreakpadForProcess( |
| 53 const std::string& process_type) { |
| 54 return process_type == ::switches::kRendererProcess || |
| 55 process_type == ::switches::kPpapiPluginProcess || |
| 56 process_type == ::switches::kZygoteProcess || |
| 57 process_type == ::switches::kGpuProcess; |
| 58 } |
| 59 |
| 60 } // namespace engine |
| 61 } // namespace blimp |
OLD | NEW |