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

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

Issue 593243002: Profile_Metrics integration with Keystone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better error handling Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/mac/keystone_glue.mm » ('j') | chrome/browser/mac/keystone_glue.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GLUE_H_ 5 #ifndef CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_
6 #define CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ 6 #define CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 9
10 #if defined(__OBJC__) 10 #if defined(__OBJC__)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // developer builds) don't want or need Keystone support and might not even 65 // developer builds) don't want or need Keystone support and might not even
66 // have the framework available. Enabling Keystone support in an application 66 // have the framework available. Enabling Keystone support in an application
67 // that uses KeystoneGlue is as simple as dropping 67 // that uses KeystoneGlue is as simple as dropping
68 // KeystoneRegistration.framework in the application's Frameworks directory 68 // KeystoneRegistration.framework in the application's Frameworks directory
69 // and providing the relevant information in its Info.plist. KeystoneGlue 69 // and providing the relevant information in its Info.plist. KeystoneGlue
70 // requires that the KSUpdateURL key be set in the application's Info.plist, 70 // requires that the KSUpdateURL key be set in the application's Info.plist,
71 // and that it contain a string identifying the update URL to be used by 71 // and that it contain a string identifying the update URL to be used by
72 // Keystone. 72 // Keystone.
73 73
74 @class KSRegistration; 74 @class KSRegistration;
75 @class KSReportingAttriburte;
76 @class KSUnsignedReportingAttribute;
75 77
76 @interface KeystoneGlue : NSObject { 78 @interface KeystoneGlue : NSObject {
77 @protected 79 @protected
78 80
79 // Data for Keystone registration 81 // Data for Keystone registration
80 NSString* productID_; 82 NSString* productID_;
81 NSString* appPath_; 83 NSString* appPath_;
82 NSString* url_; 84 NSString* url_;
83 NSString* version_; 85 NSString* version_;
84 NSString* channel_; // Logically: Dev, Beta, or Stable. 86 NSString* channel_; // Logically: Dev, Beta, or Stable.
85 BrandFileType brandFileType_; 87 BrandFileType brandFileType_;
86 88
87 // And the Keystone registration itself, with the active timer 89 // And the Keystone registration itself, with the active timer
88 KSRegistration* registration_; // strong 90 KSRegistration* registration_; // strong
89 NSTimer* timer_; // strong 91 NSTimer* timer_; // strong
90 92
91 // The most recent kAutoupdateStatusNotification notification posted. 93 // The most recent kAutoupdateStatusNotification notification posted.
92 base::scoped_nsobject<NSNotification> recentNotification_; 94 base::scoped_nsobject<NSNotification> recentNotification_;
93 95
94 // The authorization object, when it needs to persist because it's being 96 // The authorization object, when it needs to persist because it's being
95 // carried across threads. 97 // carried across threads.
96 base::mac::ScopedAuthorizationRef authorization_; 98 base::mac::ScopedAuthorizationRef authorization_;
97 99
98 // YES if a synchronous promotion operation is in progress (promotion during 100 // YES if a synchronous promotion operation is in progress (promotion during
99 // installation). 101 // installation).
100 BOOL synchronousPromotion_; 102 BOOL synchronousPromotion_;
101 103
102 // YES if an update was ever successfully installed by -installUpdate. 104 // YES if an update was ever successfully installed by -installUpdate.
103 BOOL updateSuccessfullyInstalled_; 105 BOOL updateSuccessfullyInstalled_;
106
107 // Profile count information.
108 size_t numProfiles_;
109 size_t numSignedInProfiles_;
104 } 110 }
105 111
106 // Return the default Keystone Glue object. 112 // Return the default Keystone Glue object.
107 + (id)defaultKeystoneGlue; 113 + (id)defaultKeystoneGlue;
108 114
109 // Load KeystoneRegistration.framework if present, call into it to register 115 // Load KeystoneRegistration.framework if present, call into it to register
110 // with Keystone, and set up periodic activity pings. 116 // with Keystone, and set up periodic activity pings.
111 - (void)registerWithKeystone; 117 - (void)registerWithKeystone;
112 118
113 // -checkForUpdate launches a check for updates, and -installUpdate begins 119 // -checkForUpdate launches a check for updates, and -installUpdate begins
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 synchronous:(BOOL)synchronous; 171 synchronous:(BOOL)synchronous;
166 172
167 // Requests authorization and calls -promoteTicketWithAuthorization: in 173 // Requests authorization and calls -promoteTicketWithAuthorization: in
168 // asynchronous mode. 174 // asynchronous mode.
169 - (void)promoteTicket; 175 - (void)promoteTicket;
170 176
171 // Sets a new value for appPath. Used during installation to point a ticket 177 // Sets a new value for appPath. Used during installation to point a ticket
172 // at the installed copy. 178 // at the installed copy.
173 - (void)setAppPath:(NSString*)appPath; 179 - (void)setAppPath:(NSString*)appPath;
174 180
181 // Sets the total number of profiles and the number of signed in profiles.
182 - (void)updateProfileCountsWithNumProfiles:(size_t)numProfiles
183 numSignedInProfiles:(size_t)numSignedInProfiles;
184
175 @end // @interface KeystoneGlue 185 @end // @interface KeystoneGlue
176 186
177 @interface KeystoneGlue(ExposedForTesting) 187 @interface KeystoneGlue(ExposedForTesting)
178 188
179 // Load any params we need for configuring Keystone. 189 // Load any params we need for configuring Keystone.
180 - (void)loadParameters; 190 - (void)loadParameters;
181 191
182 // Load the Keystone registration object. 192 // Load the Keystone registration object.
183 // Return NO on failure. 193 // Return NO on failure.
184 - (BOOL)loadKeystoneRegistration; 194 - (BOOL)loadKeystoneRegistration;
(...skipping 20 matching lines...) Expand all
205 215
206 // True if Keystone is enabled. 216 // True if Keystone is enabled.
207 bool KeystoneEnabled(); 217 bool KeystoneEnabled();
208 218
209 // The version of the application currently installed on disk. 219 // The version of the application currently installed on disk.
210 base::string16 CurrentlyInstalledVersion(); 220 base::string16 CurrentlyInstalledVersion();
211 221
212 } // namespace keystone_glue 222 } // namespace keystone_glue
213 223
214 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ 224 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/mac/keystone_glue.mm » ('j') | chrome/browser/mac/keystone_glue.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698