| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ | 5 #ifndef CHROME_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ |
| 6 #define CHROME_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ | 6 #define CHROME_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/crash/content/app/crash_reporter_client.h" | 11 #include "components/crash/content/app/crash_reporter_client.h" |
| 12 | 12 |
| 13 namespace installer { |
| 14 class InstallerState; |
| 15 } |
| 16 |
| 13 class InstallerCrashReporterClient | 17 class InstallerCrashReporterClient |
| 14 : public crash_reporter::CrashReporterClient { | 18 : public crash_reporter::CrashReporterClient { |
| 15 public: | 19 public: |
| 16 explicit InstallerCrashReporterClient(bool is_per_user_install); | |
| 17 ~InstallerCrashReporterClient() override; | 20 ~InstallerCrashReporterClient() override; |
| 18 | 21 |
| 22 // Sets up the crash reporting system for the installer. |
| 23 static void Configure(const installer::InstallerState&); |
| 24 |
| 19 // crash_reporter::CrashReporterClient methods: | 25 // crash_reporter::CrashReporterClient methods: |
| 20 void SetCrashReporterClientIdFromGUID( | 26 void SetCrashReporterClientIdFromGUID( |
| 21 const std::string& client_guid) override; | 27 const std::string& client_guid) override; |
| 22 bool ShouldCreatePipeName(const base::string16& process_type) override; | 28 bool ShouldCreatePipeName(const base::string16& process_type) override; |
| 23 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override; | 29 bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir) override; |
| 24 void GetProductNameAndVersion(const base::FilePath& exe_path, | 30 void GetProductNameAndVersion(const base::FilePath& exe_path, |
| 25 base::string16* product_name, | 31 base::string16* product_name, |
| 26 base::string16* version, | 32 base::string16* version, |
| 27 base::string16* special_build, | 33 base::string16* special_build, |
| 28 base::string16* channel_name) override; | 34 base::string16* channel_name) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 39 void RecordCrashDumpAttemptResult(bool is_real_crash, | 45 void RecordCrashDumpAttemptResult(bool is_real_crash, |
| 40 bool succeeded) override; | 46 bool succeeded) override; |
| 41 bool GetCrashDumpLocation(base::FilePath* crash_dir) override; | 47 bool GetCrashDumpLocation(base::FilePath* crash_dir) override; |
| 42 size_t RegisterCrashKeys() override; | 48 size_t RegisterCrashKeys() override; |
| 43 bool IsRunningUnattended() override; | 49 bool IsRunningUnattended() override; |
| 44 bool GetCollectStatsConsent() override; | 50 bool GetCollectStatsConsent() override; |
| 45 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; | 51 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; |
| 46 bool EnableBreakpadForProcess(const std::string& process_type) override; | 52 bool EnableBreakpadForProcess(const std::string& process_type) override; |
| 47 | 53 |
| 48 private: | 54 private: |
| 55 explicit InstallerCrashReporterClient(bool is_per_user_install); |
| 56 |
| 49 bool is_per_user_install_; | 57 bool is_per_user_install_; |
| 50 | 58 |
| 51 DISALLOW_COPY_AND_ASSIGN(InstallerCrashReporterClient); | 59 DISALLOW_COPY_AND_ASSIGN(InstallerCrashReporterClient); |
| 52 }; | 60 }; |
| 53 | 61 |
| 54 #endif // CHROME_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ | 62 #endif // CHROME_INSTALLER_SETUP_INSTALLER_CRASH_REPORTER_CLIENT_H_ |
| OLD | NEW |