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 #ifndef CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ | 5 #ifndef CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ |
6 #define CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ | 6 #define CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... | |
26 // Must not be called more than once. | 26 // Must not be called more than once. |
27 static void Initialize(const std::string& process_type, | 27 static void Initialize(const std::string& process_type, |
28 const base::FilePath& log_file_path); | 28 const base::FilePath& log_file_path); |
29 | 29 |
30 // Returns the directory location for crash dumps. | 30 // Returns the directory location for crash dumps. |
31 static bool GetCrashDumpLocation(base::FilePath* crash_dir); | 31 static bool GetCrashDumpLocation(base::FilePath* crash_dir); |
32 | 32 |
33 // Registers JNI methods for this module. | 33 // Registers JNI methods for this module. |
34 static bool RegisterCastCrashJni(JNIEnv* env); | 34 static bool RegisterCastCrashJni(JNIEnv* env); |
35 | 35 |
36 // Returns whether or not the user has allowed for uploading crash dumps. | |
37 bool CanUploadCrashDump(); | |
38 | |
39 void UploadCrashDumps(); | |
40 | |
41 private: | 36 private: |
42 CrashHandler(const base::FilePath& log_file_path); | 37 CrashHandler(const base::FilePath& log_file_path); |
43 ~CrashHandler(); | 38 ~CrashHandler(); |
44 | 39 |
45 void Initialize(const std::string& process_type); | 40 void Initialize(const std::string& process_type); |
46 | 41 |
47 // Starts a thread to periodically check for uploads | 42 // Starts a thread to periodically check for uploads |
48 void InitializeUploader(); | 43 void InitializeUploader(); |
49 | 44 |
50 // Path to the current process's log file. | 45 // Path to the current process's log file. |
51 base::FilePath log_file_path_; | 46 base::FilePath log_file_path_; |
52 | 47 |
53 // Location to which crash dumps should be written. | 48 // Location to which crash dumps should be written. |
54 base::FilePath crash_dump_path_; | 49 base::FilePath crash_dump_path_; |
55 | 50 |
56 scoped_ptr<CastCrashReporterClientAndroid> crash_reporter_client_; | 51 scoped_ptr<CastCrashReporterClientAndroid> crash_reporter_client_; |
57 scoped_ptr<google_breakpad::ExceptionHandler> crash_uploader_; | 52 scoped_ptr<google_breakpad::ExceptionHandler> crash_uploader_; |
slan
2015/06/11 15:12:46
This is no longer used. Please remove.
gunsch
2015/06/11 16:35:44
Done.
| |
58 | 53 |
59 DISALLOW_COPY_AND_ASSIGN(CrashHandler); | 54 DISALLOW_COPY_AND_ASSIGN(CrashHandler); |
60 }; | 55 }; |
61 | 56 |
62 } // namespace chromecast | 57 } // namespace chromecast |
63 | 58 |
64 #endif // CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ | 59 #endif // CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_ |
OLD | NEW |