Home | History | Annotate | Download | only in app
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
      6 #define CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/compiler_specific.h"
     10 #include "components/breakpad/breakpad_client.h"
     11 
     12 namespace chrome {
     13 
     14 class ChromeBreakpadClient : public breakpad::BreakpadClient {
     15  public:
     16   ChromeBreakpadClient();
     17   virtual ~ChromeBreakpadClient();
     18 
     19   // breakpad::BreakpadClient implementation.
     20 #if defined(OS_WIN)
     21   virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir)
     22       OVERRIDE;
     23   virtual void GetProductNameAndVersion(const base::FilePath& exe_path,
     24                                         base::string16* product_name,
     25                                         base::string16* version,
     26                                         base::string16* special_build,
     27                                         base::string16* channel_name) OVERRIDE;
     28   virtual bool ShouldShowRestartDialog(base::string16* title,
     29                                        base::string16* message,
     30                                        bool* is_rtl_locale) OVERRIDE;
     31   virtual bool AboutToRestart() OVERRIDE;
     32   virtual base::string16 GetCrashGUID() OVERRIDE;
     33   virtual bool GetDeferredUploadsSupported(bool is_per_user_install) OVERRIDE;
     34   virtual bool GetIsPerUserInstall(const base::FilePath& exe_path) OVERRIDE;
     35   virtual bool GetShouldDumpLargerDumps(bool is_per_user_install) OVERRIDE;
     36   virtual int GetResultCodeRespawnFailed() OVERRIDE;
     37 #endif
     38 
     39 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
     40   virtual void GetProductNameAndVersion(std::string* product_name,
     41                                         std::string* version) OVERRIDE;
     42   virtual base::FilePath GetReporterLogFilename() OVERRIDE;
     43 #endif
     44 
     45   virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE;
     46 
     47 #if defined(OS_POSIX)
     48   virtual void SetDumpWithoutCrashingFunction(void (*function)()) OVERRIDE;
     49 #endif
     50 
     51   virtual size_t RegisterCrashKeys() OVERRIDE;
     52 
     53   virtual bool IsRunningUnattended() OVERRIDE;
     54 
     55 #if defined(OS_WIN) || defined(OS_MACOSX)
     56   virtual bool GetCollectStatsConsent() OVERRIDE;
     57 #endif
     58 
     59 #if defined(OS_ANDROID)
     60   virtual int GetAndroidMinidumpDescriptor() OVERRIDE;
     61 #endif
     62 
     63 #if defined(OS_MACOSX)
     64   virtual void InstallAdditionalFilters(BreakpadRef breakpad) OVERRIDE;
     65 #endif
     66 
     67  private:
     68   DISALLOW_COPY_AND_ASSIGN(ChromeBreakpadClient);
     69 };
     70 
     71 }  // namespace chrome
     72 
     73 #endif  // CHROME_APP_CHROME_BREAKPAD_CLIENT_H_
     74