win: Add stubs for crash reporter.
This commit is contained in:
		
					parent
					
						
							
								dd4e43eb02
							
						
					
				
			
			
				commit
				
					
						d1a5c49843
					
				
			
		
					 3 changed files with 60 additions and 6 deletions
				
			
		
							
								
								
									
										1
									
								
								atom.gyp
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								atom.gyp
									
										
									
									
									
								
							|  | @ -145,6 +145,7 @@ | ||||||
|       'common/crash_reporter/crash_reporter_mac.h', |       'common/crash_reporter/crash_reporter_mac.h', | ||||||
|       'common/crash_reporter/crash_reporter_mac.mm', |       'common/crash_reporter/crash_reporter_mac.mm', | ||||||
|       'common/crash_reporter/crash_reporter_win.cc', |       'common/crash_reporter/crash_reporter_win.cc', | ||||||
|  |       'common/crash_reporter/crash_reporter_win.h', | ||||||
|       'common/draggable_region.cc', |       'common/draggable_region.cc', | ||||||
|       'common/draggable_region.h', |       'common/draggable_region.h', | ||||||
|       'common/node_bindings.cc', |       'common/node_bindings.cc', | ||||||
|  |  | ||||||
|  | @ -2,21 +2,37 @@ | ||||||
| // Use of this source code is governed by a BSD-style license that can be
 | // Use of this source code is governed by a BSD-style license that can be
 | ||||||
| // found in the LICENSE file.
 | // found in the LICENSE file.
 | ||||||
| 
 | 
 | ||||||
| #include "common/crash_reporter/crash_reporter.h" | #include "common/crash_reporter/crash_reporter_win.h" | ||||||
|  | 
 | ||||||
|  | #include "base/memory/singleton.h" | ||||||
| 
 | 
 | ||||||
| namespace crash_reporter { | namespace crash_reporter { | ||||||
| 
 | 
 | ||||||
| // static
 | CrashReporterWin::CrashReporterWin() | ||||||
| void CrashReporter::SetCompanyName(const std::string& name) { |     : breakpad_(NULL) { | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | CrashReporterWin::~CrashReporterWin() { | ||||||
|  |   if (breakpad_ != NULL) | ||||||
|  |     BreakpadRelease(breakpad_); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void CrashReporterWin::InitBreakpad(const std::string& product_name, | ||||||
|  |                                     const std::string& version, | ||||||
|  |                                     const std::string& company_name, | ||||||
|  |                                     const std::string& submit_url, | ||||||
|  |                                     bool auto_submit, | ||||||
|  |                                     bool skip_system_crash_handler) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| void CrashReporter::SetSubmissionURL(const std::string& url) { | CrashReporterWin* CrashReporterWin::GetInstance() { | ||||||
|  |   return Singleton<CrashReporterWin>::get(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // static
 | // static
 | ||||||
| void CrashReporter::SetAutoSubmit(bool yes) { | CrashReporter* CrashReporter::GetInstance() { | ||||||
|  |   return CrashReporterWin::GetInstance(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| }  // namespace crash_reporter
 | }  // namespace crash_reporter
 | ||||||
| 
 |  | ||||||
|  |  | ||||||
							
								
								
									
										37
									
								
								common/crash_reporter/crash_reporter_win.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								common/crash_reporter/crash_reporter_win.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | ||||||
|  | // Copyright (c) 2013 GitHub, Inc. All rights reserved.
 | ||||||
|  | // Use of this source code is governed by a BSD-style license that can be
 | ||||||
|  | // found in the LICENSE file.
 | ||||||
|  | 
 | ||||||
|  | #ifndef ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_ | ||||||
|  | #define ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_ | ||||||
|  | 
 | ||||||
|  | #include "base/compiler_specific.h" | ||||||
|  | #include "common/crash_reporter/crash_reporter.h" | ||||||
|  | 
 | ||||||
|  | template <typename T> struct DefaultSingletonTraits; | ||||||
|  | 
 | ||||||
|  | namespace crash_reporter { | ||||||
|  | 
 | ||||||
|  | class CrashReporterWin : public CrashReporter { | ||||||
|  |  public: | ||||||
|  |   static CrashReporterWin* GetInstance(); | ||||||
|  | 
 | ||||||
|  |   virtual void InitBreakpad(const std::string& product_name, | ||||||
|  |                             const std::string& version, | ||||||
|  |                             const std::string& company_name, | ||||||
|  |                             const std::string& submit_url, | ||||||
|  |                             bool auto_submit, | ||||||
|  |                             bool skip_system_crash_handler) OVERRIDE; | ||||||
|  | 
 | ||||||
|  |  private: | ||||||
|  |   friend struct DefaultSingletonTraits<CrashReporterWin>; | ||||||
|  | 
 | ||||||
|  |   CrashReporterWin(); | ||||||
|  |   virtual ~CrashReporterWin(); | ||||||
|  | 
 | ||||||
|  |   DISALLOW_COPY_AND_ASSIGN(CrashReporterWin); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | }  // namespace crash_reporter
 | ||||||
|  | 
 | ||||||
|  | #endif  // ATOM_COMMON_CRASH_REPORTER_CRASH_REPORTER_WIN_H_
 | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao