Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/mac/keystone_registration.h

Issue 593243002: Profile_Metrics integration with Keystone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ 5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
6 #define CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ 6 #define CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #include <Security/Authorization.h> 9 #include <Security/Authorization.h>
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 extern NSString* KSRegistrationCheckForUpdateNotification; 42 extern NSString* KSRegistrationCheckForUpdateNotification;
43 extern NSString* KSRegistrationStatusKey; 43 extern NSString* KSRegistrationStatusKey;
44 extern NSString* KSRegistrationUpdateCheckErrorKey; 44 extern NSString* KSRegistrationUpdateCheckErrorKey;
45 45
46 extern NSString* KSRegistrationStartUpdateNotification; 46 extern NSString* KSRegistrationStartUpdateNotification;
47 extern NSString* KSUpdateCheckSuccessfulKey; 47 extern NSString* KSUpdateCheckSuccessfulKey;
48 extern NSString* KSUpdateCheckSuccessfullyInstalledKey; 48 extern NSString* KSUpdateCheckSuccessfullyInstalledKey;
49 49
50 extern NSString* KSRegistrationRemoveExistingTag; 50 extern NSString* KSRegistrationRemoveExistingTag;
51
52 extern NSString* KSReportingAttributeValueKey;
53 extern NSString* KSReportingAttributeExpirationDateKey;
54 extern NSString* KSReportingAttributeAggregationTypeKey;
51 #define KSRegistrationPreserveExistingTag nil 55 #define KSRegistrationPreserveExistingTag nil
52 56
53 } // namespace keystone_registration 57 } // namespace keystone_registration
54 58
59 typedef enum {
60 kKSReportingAggregationSum = 0, // Adds attribute value across user accounts
61 kKSReportingAggregationDefault = kKSReportingAggregationSum,
62 } KSReportingAggregationType;
63
55 @interface KSRegistration : NSObject 64 @interface KSRegistration : NSObject
56 65
57 + (id)registrationWithProductID:(NSString*)productID; 66 + (id)registrationWithProductID:(NSString*)productID;
58 67
59 - (BOOL)registerWithParameters:(NSDictionary*)args; 68 - (BOOL)registerWithParameters:(NSDictionary*)args;
60 69
61 - (BOOL)promoteWithParameters:(NSDictionary*)args 70 - (BOOL)promoteWithParameters:(NSDictionary*)args
62 authorization:(AuthorizationRef)authorization; 71 authorization:(AuthorizationRef)authorization;
63 72
64 - (BOOL)setActive; 73 - (BOOL)setActive;
74 - (BOOL)setActiveWithReportingAttributes:(NSArray*)reportingAttributes
75 error:(NSError**)error;
65 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated; 76 - (void)checkForUpdateWasUserInitiated:(BOOL)userInitiated;
66 - (void)startUpdate; 77 - (void)startUpdate;
67 - (keystone_registration::KSRegistrationTicketType)ticketType; 78 - (keystone_registration::KSRegistrationTicketType)ticketType;
68 79
69 @end // @interface KSRegistration 80 @end // @interface KSRegistration
70 81
82
83 // Declarations of the Keystone attribute reporting bits needed here.
84 // Full definition is at:
85 // //depot/googlemac/opensource/update-engine/Common/KSReportingAttribute.h
86 @interface KSReportingAttribute : NSObject
87
88 @end // @interface KSReportingAttribute
89
90 @interface KSUnsignedReportingAttribute : KSReportingAttribute
91
92 + (KSUnsignedReportingAttribute *)reportingAttributeWithValue:(uint32_t)value
93 name:(NSString *)name
94 aggregationType:(KSReportingAggregationType)aggregationType
95 error:(NSError **)error;
96
97 @end // @interface KSUnsignedReportingAttribute
98
99
71 #endif // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_ 100 #endif // CHROME_BROWSER_MAC_KEYSTONE_REGISTRATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/mac/keystone_glue_unittest.mm ('k') | chrome/browser/mac/keystone_registration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698