OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromecast/crash/android/cast_crash_reporter_client_android.h" | 5 #include "chromecast/crash/android/cast_crash_reporter_client_android.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "chromecast/android/chromecast_config_android.h" | 11 #include "chromecast/android/chromecast_config_android.h" |
12 #include "chromecast/common/global_descriptors.h" | 12 #include "chromecast/common/global_descriptors.h" |
13 #include "chromecast/common/version.h" | 13 #include "chromecast/common/version.h" |
| 14 #include "chromecast/crash/cast_crash_keys.h" |
14 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
15 | 16 |
16 namespace chromecast { | 17 namespace chromecast { |
17 | 18 |
18 CastCrashReporterClientAndroid::CastCrashReporterClientAndroid() { | 19 CastCrashReporterClientAndroid::CastCrashReporterClientAndroid() { |
19 } | 20 } |
20 | 21 |
21 CastCrashReporterClientAndroid::~CastCrashReporterClientAndroid() { | 22 CastCrashReporterClientAndroid::~CastCrashReporterClientAndroid() { |
22 } | 23 } |
23 | 24 |
(...skipping 24 matching lines...) Expand all Loading... |
48 if (!base::CreateDirectory(crash_dir_local)) { | 49 if (!base::CreateDirectory(crash_dir_local)) { |
49 return false; | 50 return false; |
50 } | 51 } |
51 } | 52 } |
52 | 53 |
53 // Provide value to crash_dir once directory is known to be a valid path. | 54 // Provide value to crash_dir once directory is known to be a valid path. |
54 *crash_dir = crash_dir_local; | 55 *crash_dir = crash_dir_local; |
55 return true; | 56 return true; |
56 } | 57 } |
57 | 58 |
| 59 size_t CastCrashReporterClientAndroid::RegisterCrashKeys() { |
| 60 return crash_keys::RegisterCastCrashKeys(); |
| 61 } |
| 62 |
58 bool CastCrashReporterClientAndroid::GetCollectStatsConsent() { | 63 bool CastCrashReporterClientAndroid::GetCollectStatsConsent() { |
59 return android::ChromecastConfigAndroid::GetInstance()->CanSendUsageStats(); | 64 return android::ChromecastConfigAndroid::GetInstance()->CanSendUsageStats(); |
60 } | 65 } |
61 | 66 |
62 int CastCrashReporterClientAndroid::GetAndroidMinidumpDescriptor() { | 67 int CastCrashReporterClientAndroid::GetAndroidMinidumpDescriptor() { |
63 return kAndroidMinidumpDescriptor; | 68 return kAndroidMinidumpDescriptor; |
64 } | 69 } |
65 | 70 |
66 bool CastCrashReporterClientAndroid::EnableBreakpadForProcess( | 71 bool CastCrashReporterClientAndroid::EnableBreakpadForProcess( |
67 const std::string& process_type) { | 72 const std::string& process_type) { |
68 return process_type == switches::kRendererProcess || | 73 return process_type == switches::kRendererProcess || |
69 process_type == switches::kGpuProcess; | 74 process_type == switches::kGpuProcess; |
70 } | 75 } |
71 | 76 |
72 } // namespace chromecast | 77 } // namespace chromecast |
OLD | NEW |