| Index: ios/chrome/browser/crash_report/crash_report_multi_parameter.h
|
| diff --git a/ios/chrome/browser/crash_report/crash_report_multi_parameter.h b/ios/chrome/browser/crash_report/crash_report_multi_parameter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0175367b8dd6ec649ba811bd66f8bd2789286ea3
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/crash_report/crash_report_multi_parameter.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_
|
| +#define IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_
|
| +
|
| +#include <Foundation/Foundation.h>
|
| +
|
| +// CrashReportMultiParameter keeps state of multiple report values that will be
|
| +// grouped in a single breakpad element to save limited number of breakpad
|
| +// values.
|
| +@interface CrashReportMultiParameter : NSObject
|
| +// Init with the breakpad parameter key.
|
| +- (id)initWithKey:(NSString*)key;
|
| +
|
| +// Adds or updates an element in the dictionary of the breakpad report. Value
|
| +// are stored in the instance so every time you call this function, the whole
|
| +// JSON dictionary is regenerated. The total size of the serialized dictionary
|
| +// bmust e under 256 bytes due to Breakpad limitation. Setting a value to 0 will
|
| +// not remove the key. Use [removeValue:key] instead.
|
| +- (void)setValue:(NSString*)key withValue:(int)value;
|
| +
|
| +// Removes the key element from the dictionary. Note that this is different from
|
| +// setting the parameter to 0 or false.
|
| +- (void)removeValue:(NSString*)key;
|
| +
|
| +// Increases the key element by one.
|
| +- (void)incrementValue:(NSString*)key;
|
| +
|
| +// Decreases the key element by one. If the element is 0, the element is removed
|
| +// from the dictionary.
|
| +- (void)decrementValue:(NSString*)key;
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_CRASH_REPORT_CRASH_REPORT_MULTI_PARAMETER_H_
|
|
|