Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Side by Side Diff: chromecast/crash/android/crash_handler.h

Issue 1154383006: Adding crash utilities to chromecast/crash. (Closed) Base URL: https://eureka-internal.googlesource.com/chromium/src@master
Patch Set: cast_shell_unittests not built for android Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_
6 #define CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_
7
8 #include <jni.h>
9 #include <string>
10
11 #include "base/files/file_path.h"
12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14
15 namespace chromecast {
16 class CastCrashReporterClientAndroid;
17
18 class CrashHandler {
19 public:
20 // Initializes the crash handler for attempting to upload crash dumps with
21 // the current process's log file.
22 // Must not be called more than once.
23 static void Initialize(const std::string& process_type,
24 const base::FilePath& log_file_path);
25
26 // Returns the directory location for crash dumps.
27 static bool GetCrashDumpLocation(base::FilePath* crash_dir);
28
29 // Registers JNI methods for this module.
30 static bool RegisterCastCrashJni(JNIEnv* env);
31
32 private:
33 CrashHandler(const std::string& process_type,
34 const base::FilePath& log_file_path);
35 ~CrashHandler();
36
37 void Initialize();
38
39 // Starts a thread to periodically check for uploads
40 void InitializeUploader();
41
42 // Path to the current process's log file.
43 base::FilePath log_file_path_;
44
45 // Location to which crash dumps should be written.
46 base::FilePath crash_dump_path_;
47
48 std::string process_type_;
49
50 scoped_ptr<CastCrashReporterClientAndroid> crash_reporter_client_;
51
52 DISALLOW_COPY_AND_ASSIGN(CrashHandler);
53 };
54
55 } // namespace chromecast
56
57 #endif // CHROMECAST_CRASH_ANDROID_CRASH_HANDLER_H_
OLDNEW
« no previous file with comments | « chromecast/crash/android/cast_crash_reporter_client_android.cc ('k') | chromecast/crash/android/crash_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698