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

Side by Side Diff: chrome/app/chrome_crash_reporter_client_win.h

Issue 1904613002: Preparation patch for moving the chrome crashpad integration into chrome_elf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add chrome_installer_static.gypi Created 4 years, 8 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_ 5 #ifndef CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_
6 #define CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_ 6 #define CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9
10 #include <memory> 9 #include <memory>
11 10
12 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
13 #include "base/macros.h" 12 #include "base/macros.h"
14 #include "build/build_config.h" 13 #include "build/build_config.h"
15 #include "components/crash/content/app/crash_reporter_client.h" 14 #include "components/crash/content/app/crash_reporter_client.h"
16 15
17 namespace browser_watcher { 16 namespace browser_watcher {
18 class CrashReportingMetrics; 17 class CrashReportingMetrics;
19 } // namespace browser_watcher 18 } // namespace browser_watcher
20 19
21 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient { 20 class ChromeCrashReporterClient : public crash_reporter::CrashReporterClient {
sky 2016/04/20 02:15:22 I think this code would be clearer if you named th
ananta 2016/04/20 20:15:35 I guess it would make it clearer. I think we proba
22 public: 21 public:
23 ChromeCrashReporterClient(); 22 ChromeCrashReporterClient();
24 ~ChromeCrashReporterClient() override; 23 ~ChromeCrashReporterClient() override;
25 24
26 // crash_reporter::CrashReporterClient implementation. 25 // crash_reporter::CrashReporterClient implementation.
27 #if !defined(OS_MACOSX) && !defined(OS_WIN)
28 void SetCrashReporterClientIdFromGUID(
29 const std::string& client_guid) override;
30 #endif
31 #if defined(OS_WIN)
32 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override; 26 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override;
33 void GetProductNameAndVersion(const base::FilePath& exe_path, 27 void GetProductNameAndVersion(const base::FilePath& exe_path,
34 base::string16* product_name, 28 base::string16* product_name,
35 base::string16* version, 29 base::string16* version,
36 base::string16* special_build, 30 base::string16* special_build,
37 base::string16* channel_name) override; 31 base::string16* channel_name) override;
38 bool ShouldShowRestartDialog(base::string16* title, 32 bool ShouldShowRestartDialog(base::string16* title,
39 base::string16* message, 33 base::string16* message,
40 bool* is_rtl_locale) override; 34 bool* is_rtl_locale) override;
41 bool AboutToRestart() override; 35 bool AboutToRestart() override;
42 bool GetDeferredUploadsSupported(bool is_per_user_install) override; 36 bool GetDeferredUploadsSupported(bool is_per_user_install) override;
43 bool GetIsPerUserInstall(const base::FilePath& exe_path) override; 37 bool GetIsPerUserInstall(const base::FilePath& exe_path) override;
44 bool GetShouldDumpLargerDumps(bool is_per_user_install) override; 38 bool GetShouldDumpLargerDumps(bool is_per_user_install) override;
45 int GetResultCodeRespawnFailed() override; 39 int GetResultCodeRespawnFailed() override;
46 void InitBrowserCrashDumpsRegKey() override; 40 void InitBrowserCrashDumpsRegKey() override;
47 void RecordCrashDumpAttempt(bool is_real_crash) override; 41 void RecordCrashDumpAttempt(bool is_real_crash) override;
48 void RecordCrashDumpAttemptResult(bool is_real_crash, 42 void RecordCrashDumpAttemptResult(bool is_real_crash,
49 bool succeeded) override; 43 bool succeeded) override;
50 #endif
51
52 #if defined(OS_POSIX) && !defined(OS_MACOSX)
53 void GetProductNameAndVersion(const char** product_name,
54 const char** version) override;
55 base::FilePath GetReporterLogFilename() override;
56 #endif
57 44
58 bool GetCrashDumpLocation(base::FilePath* crash_dir) override; 45 bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
59 46
60 size_t RegisterCrashKeys() override; 47 size_t RegisterCrashKeys() override;
61 48
62 bool IsRunningUnattended() override; 49 bool IsRunningUnattended() override;
63 50
64 bool GetCollectStatsConsent() override; 51 bool GetCollectStatsConsent() override;
65 52
66 #if defined(OS_WIN) || defined(OS_MACOSX)
67 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; 53 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override;
68 #endif
69
70 #if defined(OS_ANDROID)
71 int GetAndroidMinidumpDescriptor() override;
72 #endif
73 54
74 bool EnableBreakpadForProcess(const std::string& process_type) override; 55 bool EnableBreakpadForProcess(const std::string& process_type) override;
75 56
76 private: 57 private:
77 #if defined(OS_WIN)
78 std::unique_ptr<browser_watcher::CrashReportingMetrics> 58 std::unique_ptr<browser_watcher::CrashReportingMetrics>
79 crash_reporting_metrics_; 59 crash_reporting_metrics_;
80 #endif
81 60
82 DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient); 61 DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient);
83 }; 62 };
84 63
85 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_H_ 64 #endif // CHROME_APP_CHROME_CRASH_REPORTER_CLIENT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698