| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ | 5 #ifndef COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ |
| 6 #define COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ | 6 #define COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // The components's embedder API should only be used by the component. | 38 // The components's embedder API should only be used by the component. |
| 39 CrashReporterClient* GetCrashReporterClient(); | 39 CrashReporterClient* GetCrashReporterClient(); |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 // Interface that the embedder implements. | 42 // Interface that the embedder implements. |
| 43 class CrashReporterClient { | 43 class CrashReporterClient { |
| 44 public: | 44 public: |
| 45 CrashReporterClient(); | 45 CrashReporterClient(); |
| 46 virtual ~CrashReporterClient(); | 46 virtual ~CrashReporterClient(); |
| 47 | 47 |
| 48 #if !defined(OS_MACOSX) |
| 48 // Sets the crash reporting client ID, a unique identifier for the client | 49 // Sets the crash reporting client ID, a unique identifier for the client |
| 49 // that is sending crash reports. After it is set, it should not be changed. | 50 // that is sending crash reports. After it is set, it should not be changed. |
| 50 // |client_guid| may either be a full GUID or a GUID that was already stripped | 51 // |client_guid| may either be a full GUID or a GUID that was already stripped |
| 51 // from its dashes. | 52 // from its dashes. |
| 53 // |
| 54 // On Mac OS X, this is the responsibility of Crashpad, and can not be set |
| 55 // directly by the client. |
| 52 virtual void SetCrashReporterClientIdFromGUID(const std::string& client_guid); | 56 virtual void SetCrashReporterClientIdFromGUID(const std::string& client_guid); |
| 57 #endif |
| 53 | 58 |
| 54 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 55 // Returns true if an alternative location to store the minidump files was | 60 // Returns true if an alternative location to store the minidump files was |
| 56 // specified. Returns true if |crash_dir| was set. | 61 // specified. Returns true if |crash_dir| was set. |
| 57 virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir); | 62 virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir); |
| 58 | 63 |
| 59 // Returns a textual description of the product type and version to include | 64 // Returns a textual description of the product type and version to include |
| 60 // in the crash report. | 65 // in the crash report. |
| 61 virtual void GetProductNameAndVersion(const base::FilePath& exe_path, | 66 virtual void GetProductNameAndVersion(const base::FilePath& exe_path, |
| 62 base::string16* product_name, | 67 base::string16* product_name, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 139 |
| 135 #if defined(OS_ANDROID) | 140 #if defined(OS_ANDROID) |
| 136 // Returns the descriptor key of the android minidump global descriptor. | 141 // Returns the descriptor key of the android minidump global descriptor. |
| 137 virtual int GetAndroidMinidumpDescriptor(); | 142 virtual int GetAndroidMinidumpDescriptor(); |
| 138 | 143 |
| 139 // Returns true if breakpad microdumps should be enabled. This orthogonal to | 144 // Returns true if breakpad microdumps should be enabled. This orthogonal to |
| 140 // the standard minidump uploader (which depends on the user consent). | 145 // the standard minidump uploader (which depends on the user consent). |
| 141 virtual bool ShouldEnableBreakpadMicrodumps(); | 146 virtual bool ShouldEnableBreakpadMicrodumps(); |
| 142 #endif | 147 #endif |
| 143 | 148 |
| 144 #if defined(OS_MACOSX) | |
| 145 // Install additional breakpad filter callbacks. | |
| 146 virtual void InstallAdditionalFilters(BreakpadRef breakpad); | |
| 147 #endif | |
| 148 | |
| 149 // Returns true if breakpad should run in the given process type. | 149 // Returns true if breakpad should run in the given process type. |
| 150 virtual bool EnableBreakpadForProcess(const std::string& process_type); | 150 virtual bool EnableBreakpadForProcess(const std::string& process_type); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace crash_reporter | 153 } // namespace crash_reporter |
| 154 | 154 |
| 155 #endif // COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ | 155 #endif // COMPONENTS_CRASH_APP_CRASH_REPORTER_CLIENT_H_ |
| OLD | NEW |