Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / ios / chrome / browser / crash_report / crash_report_multi_parameter.h
blob4a3769cc8dac5ddae91b737e1f9a277633c84eda
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.
5 #ifndef IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_
6 #define IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_
8 #include <Foundation/Foundation.h>
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;
17 - (instancetype)init NS_UNAVAILABLE;
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;
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;
30 // Increases the key element by one.
31 - (void)incrementValue:(NSString*)key;
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
38 #endif // IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_