| 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_APP_ANDROID_CRASH_HANDLER_H_ | 5 #ifndef CHROMECAST_APP_ANDROID_CRASH_HANDLER_H_ |
| 6 #define CHROMECAST_APP_ANDROID_CRASH_HANDLER_H_ | 6 #define CHROMECAST_APP_ANDROID_CRASH_HANDLER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 |
| 10 #include <memory> |
| 9 #include <string> | 11 #include <string> |
| 10 | 12 |
| 11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 12 #include "base/macros.h" | 14 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 | 15 |
| 15 namespace chromecast { | 16 namespace chromecast { |
| 16 class CastCrashReporterClientAndroid; | 17 class CastCrashReporterClientAndroid; |
| 17 | 18 |
| 18 class CrashHandler { | 19 class CrashHandler { |
| 19 public: | 20 public: |
| 20 // Initializes the crash handler for attempting to upload crash dumps with | 21 // Initializes the crash handler for attempting to upload crash dumps with |
| 21 // the current process's log file. | 22 // the current process's log file. |
| 22 // Must not be called more than once. | 23 // Must not be called more than once. |
| 23 static void Initialize(const std::string& process_type, | 24 static void Initialize(const std::string& process_type, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 void InitializeUploader(); | 41 void InitializeUploader(); |
| 41 | 42 |
| 42 // Path to the current process's log file. | 43 // Path to the current process's log file. |
| 43 base::FilePath log_file_path_; | 44 base::FilePath log_file_path_; |
| 44 | 45 |
| 45 // Location to which crash dumps should be written. | 46 // Location to which crash dumps should be written. |
| 46 base::FilePath crash_dump_path_; | 47 base::FilePath crash_dump_path_; |
| 47 | 48 |
| 48 std::string process_type_; | 49 std::string process_type_; |
| 49 | 50 |
| 50 scoped_ptr<CastCrashReporterClientAndroid> crash_reporter_client_; | 51 std::unique_ptr<CastCrashReporterClientAndroid> crash_reporter_client_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(CrashHandler); | 53 DISALLOW_COPY_AND_ASSIGN(CrashHandler); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace chromecast | 56 } // namespace chromecast |
| 56 | 57 |
| 57 #endif // CHROMECAST_APP_ANDROID_CRASH_HANDLER_H_ | 58 #endif // CHROMECAST_APP_ANDROID_CRASH_HANDLER_H_ |
| OLD | NEW |