OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // A wrapper around common crash reporting code to manage reporting for Chrome | |
6 // Frame. | |
7 | |
8 #ifndef CHROME_FRAME_CHROME_FRAME_REPORTING_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_REPORTING_H_ |
9 #define CHROME_FRAME_CHROME_FRAME_REPORTING_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_REPORTING_H_ |
10 | 7 |
11 #include "chrome_frame/crash_reporting/crash_report.h" | 8 #include "chrome_frame/scoped_initialization_manager.h" |
12 | 9 |
13 extern const wchar_t kSystemPrincipalSid[]; | 10 namespace chrome_frame { |
14 | 11 |
15 // Intialize crash reporting for Chrome Frame. Specific parameters here include | 12 // A Traits class for a ScopedInitializationManager that starts/stops crash |
16 // using the temp directory for dumps, determining if the install is system | 13 // reporting for npchrome_frame.dll. |
17 // wide or user specific, and customized client info. | 14 class CrashReportingTraits { |
18 bool InitializeCrashReporting(); | 15 public: |
| 16 static void Initialize(); |
| 17 static void Shutdown(); |
| 18 }; |
19 | 19 |
20 // Shut down crash reporting for Chrome Frame. | 20 // Manages crash reporting for the Chrome Frame dll. Crash reporting cannot be |
21 bool ShutdownCrashReporting(); | 21 // reliably started or stopped when the loader lock is held, so DllMain cannot |
| 22 // be used to start/stop reporting. Rather, instances of this class are used in |
| 23 // each entrypoint into the dll. |
| 24 typedef ScopedInitializationManager<CrashReportingTraits> ScopedCrashReporting; |
| 25 |
| 26 } // namespace chrome_frame |
22 | 27 |
23 #endif // CHROME_FRAME_CHROME_FRAME_REPORTING_H_ | 28 #endif // CHROME_FRAME_CHROME_FRAME_REPORTING_H_ |
OLD | NEW |