OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_BROWSER_MAC_EXCEPTION_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_MAC_EXCEPTION_PROCESSOR_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 @class NSException; |
| 11 |
| 12 namespace chrome { |
| 13 |
| 14 // Installs the Objective-C exception preprocessor. This records UMA and crash |
| 15 // keys for NSException objects. The preprocessor will also make fatal any |
| 16 // exception that is not handled. |
| 17 void InstallObjcExceptionPreprocessor(); |
| 18 |
| 19 // The items below are exposed only for testing. |
| 20 //////////////////////////////////////////////////////////////////////////////// |
| 21 |
| 22 // Removes the exception preprocessor if it is installed. |
| 23 void UninstallObjcExceptionPreprocessor(); |
| 24 |
| 25 // Bin for unknown exceptions. |
| 26 extern const size_t kUnknownNSException; |
| 27 |
| 28 // Returns the histogram bin for |exception| if it is one we track |
| 29 // specifically, or |kUnknownNSException| if unknown. |
| 30 size_t BinForException(NSException* exception); |
| 31 |
| 32 // Use UMA to track exception occurance. |
| 33 void RecordExceptionWithUma(NSException* exception); |
| 34 |
| 35 } // namespace chrome |
| 36 |
| 37 #endif // CHROME_BROWSER_MAC_EXCEPTION_PROCESSOR_H_ |
OLD | NEW |