Index: chrome/browser/mac/keystone_registration.h |
diff --git a/chrome/browser/mac/keystone_registration.h b/chrome/browser/mac/keystone_registration.h |
index 056dde1f0b58ada46470544aa54e9735bcfe7cb5..4b3feafabf001daebe7e0af1dda79d22239e63e9 100644 |
--- a/chrome/browser/mac/keystone_registration.h |
+++ b/chrome/browser/mac/keystone_registration.h |
@@ -48,10 +48,19 @@ extern NSString* KSUpdateCheckSuccessfulKey; |
extern NSString* KSUpdateCheckSuccessfullyInstalledKey; |
extern NSString* KSRegistrationRemoveExistingTag; |
+ |
+extern NSString* KSReportingAttributeValueKey; |
+extern NSString* KSReportingAttributeExpirationDateKey; |
+extern NSString* KSReportingAttributeAggregationTypeKey; |
#define KSRegistrationPreserveExistingTag nil |
} // namespace keystone_registration |
+typedef enum { |
+ kKSReportingAggregationSum = 0, // Adds attribute value across user accounts |
+ kKSReportingAggregationDefault = kKSReportingAggregationSum, |
+} KSReportingAggregationType; |
+ |
@interface KSRegistration : NSObject |
+ (id)registrationWithProductID:(NSString*)productID; |
@@ -62,10 +71,50 @@ extern NSString* KSRegistrationRemoveExistingTag; |
authorization:(AuthorizationRef)authorization; |
- (BOOL)setActive; |
+- (BOOL)setActiveWithReportingAttributes:(NSArray*)reportingAttributes |
+ error:(NSError**)error; |
- (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated; |
- (void)startUpdate; |
- (keystone_registration::KSRegistrationTicketType)ticketType; |
@end // @interface KSRegistration |
+ |
+// Declarations of the Keystone attribute reporting bits needed here. |
+// Full definition is at: |
+// //depot/googlemac/opensource/update-engine/Common/KSReportingAttribute.h |
+@interface KSReportingAttribute : NSObject |
+ |
+@end // @interface KSReportingAttribute |
+ |
+/* |
Mark Mentovai
2015/02/20 21:54:19
We don’t need to copy any of the documentation. Se
Mike Lerman
2015/02/23 16:12:11
Done. I kept the location of the source file, simi
|
+ * The class holds a single custom reporting attribute of type unsigned integer |
+ * that the application would like to pass during the update server ping. |
+ */ |
+@interface KSUnsignedReportingAttribute : KSReportingAttribute |
+ |
+/** |
+ * Creates unsinged reporting attribute using the default lifetime. |
+ * |
+ * @param value The value of the attribute. |
+ * @param name The name of the attribute. |
+ * @param aggregationType In the case of system update engine, attribute values |
+ * are aggregated between users and reported once for the whole machine. This |
+ * parameter controls the aggregationmechinism. |
+ * @see KSReportingAggregationType |
+ * @param error Standard error parameter. |
+ * |
+ * @return Reporting attribute object, holding the specified integer value and |
+ * initialized with the specified properties (name, aggregation type, etc.). In |
+ * case of error, the method returns nil and if @c error is not nil, the method |
+ * sets it accordingly. |
+ */ |
++ (KSUnsignedReportingAttribute *)reportingAttributeWithValue:(uint32_t)value |
+ name:(NSString *)name |
+ aggregationType:(KSReportingAggregationType)aggregationType |
+ error:(NSError **)error; |
+ |
+@end // @interface KSUnsignedReportingAttribute |
+ |
+ |
#endif // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ |