| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 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 IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_ |
| 6 #define IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_ |
| 7 |
| 8 #include <Foundation/Foundation.h> |
| 9 |
| 10 // CrashReportMultiParameter keeps state of multiple report values that will be |
| 11 // grouped in a single breakpad element to save limited number of breakpad |
| 12 // values. |
| 13 @interface CrashReportMultiParameter : NSObject |
| 14 // Init with the breakpad parameter key. |
| 15 - (instancetype)initWithKey:(NSString*)key NS_DESIGNATED_INITIALIZER; |
| 16 |
| 17 - (instancetype)init NS_UNAVAILABLE; |
| 18 |
| 19 // Adds or updates an element in the dictionary of the breakpad report. Value |
| 20 // are stored in the instance so every time you call this function, the whole |
| 21 // JSON dictionary is regenerated. The total size of the serialized dictionary |
| 22 // bmust e under 256 bytes due to Breakpad limitation. Setting a value to 0 will |
| 23 // not remove the key. Use [removeValue:key] instead. |
| 24 - (void)setValue:(NSString*)key withValue:(int)value; |
| 25 |
| 26 // Removes the key element from the dictionary. Note that this is different from |
| 27 // setting the parameter to 0 or false. |
| 28 - (void)removeValue:(NSString*)key; |
| 29 |
| 30 // Increases the key element by one. |
| 31 - (void)incrementValue:(NSString*)key; |
| 32 |
| 33 // Decreases the key element by one. If the element is 0, the element is removed |
| 34 // from the dictionary. |
| 35 - (void)decrementValue:(NSString*)key; |
| 36 @end |
| 37 |
| 38 #endif // IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_ |
| OLD | NEW |