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 BlimpEngineCrashReporterClient::BlimpEngineCrashReporterClient() {} |
| 16 BlimpEngineCrashReporterClient::~BlimpEngineCrashReporterClient() {} |
| 17 |
| 18 void BlimpEngineCrashReporterClient::SetCrashReporterClientIdFromGUID( |
| 19 const std::string& client_guid) { |
| 20 ::crash_keys::SetMetricsClientIdFromGUID(client_guid); |
| 21 } |
| 22 |
| 23 void BlimpEngineCrashReporterClient::GetProductNameAndVersion( |
| 24 const char** product_name, |
| 25 const char** version) { |
| 26 *product_name = "Chrome_Blimp_Engine"; |
| 27 *version = PRODUCT_VERSION; |
| 28 } |
| 29 |
| 30 size_t BlimpEngineCrashReporterClient::RegisterCrashKeys() { |
| 31 return RegisterEngineCrashKeys(); |
| 32 } |
| 33 |
| 34 bool BlimpEngineCrashReporterClient::IsRunningUnattended() { |
| 35 // If this returns "true," crash reports will not be uploaded. For now the |
| 36 // engine will not be running unattended. Eventually when automated testing |
| 37 // harnesses are set up, this should be changed to return "true" in those |
| 38 // cases. |
| 39 return false; |
| 40 } |
| 41 |
| 42 bool BlimpEngineCrashReporterClient::GetCollectStatsConsent() { |
| 43 // Always collect Blimp engine crash reports. |
| 44 return true; |
| 45 } |
| 46 |
| 47 bool BlimpEngineCrashReporterClient::EnableBreakpadForProcess( |
| 48 const std::string& process_type) { |
| 49 return process_type == ::switches::kRendererProcess || |
| 50 process_type == ::switches::kPpapiPluginProcess || |
| 51 process_type == ::switches::kZygoteProcess || |
| 52 process_type == ::switches::kGpuProcess; |
| 53 } |
| 54 |
| 55 } // namespace engine |
| 56 } // namespace blimp |
OLD | NEW |