OLD | NEW |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 NSString* productID_; | 80 NSString* productID_; |
81 NSString* appPath_; | 81 NSString* appPath_; |
82 NSString* url_; | 82 NSString* url_; |
83 NSString* version_; | 83 NSString* version_; |
84 NSString* channel_; // Logically: Dev, Beta, or Stable. | 84 NSString* channel_; // Logically: Dev, Beta, or Stable. |
85 BrandFileType brandFileType_; | 85 BrandFileType brandFileType_; |
86 | 86 |
87 // And the Keystone registration itself, with the active timer | 87 // And the Keystone registration itself, with the active timer |
88 KSRegistration* registration_; // strong | 88 KSRegistration* registration_; // strong |
89 NSTimer* timer_; // strong | 89 NSTimer* timer_; // strong |
| 90 Class ksUnsignedReportingAttributeClass_; |
90 | 91 |
91 // The most recent kAutoupdateStatusNotification notification posted. | 92 // The most recent kAutoupdateStatusNotification notification posted. |
92 base::scoped_nsobject<NSNotification> recentNotification_; | 93 base::scoped_nsobject<NSNotification> recentNotification_; |
93 | 94 |
94 // The authorization object, when it needs to persist because it's being | 95 // The authorization object, when it needs to persist because it's being |
95 // carried across threads. | 96 // carried across threads. |
96 base::mac::ScopedAuthorizationRef authorization_; | 97 base::mac::ScopedAuthorizationRef authorization_; |
97 | 98 |
98 // YES if a synchronous promotion operation is in progress (promotion during | 99 // YES if a synchronous promotion operation is in progress (promotion during |
99 // installation). | 100 // installation). |
100 BOOL synchronousPromotion_; | 101 BOOL synchronousPromotion_; |
101 | 102 |
102 // YES if an update was ever successfully installed by -installUpdate. | 103 // YES if an update was ever successfully installed by -installUpdate. |
103 BOOL updateSuccessfullyInstalled_; | 104 BOOL updateSuccessfullyInstalled_; |
| 105 |
| 106 // Profile count information. |
| 107 uint32_t numProfiles_; |
| 108 uint32_t numSignedInProfiles_; |
104 } | 109 } |
105 | 110 |
106 // Return the default Keystone Glue object. | 111 // Return the default Keystone Glue object. |
107 + (id)defaultKeystoneGlue; | 112 + (id)defaultKeystoneGlue; |
108 | 113 |
109 // Load KeystoneRegistration.framework if present, call into it to register | 114 // Load KeystoneRegistration.framework if present, call into it to register |
110 // with Keystone, and set up periodic activity pings. | 115 // with Keystone, and set up periodic activity pings. |
111 - (void)registerWithKeystone; | 116 - (void)registerWithKeystone; |
112 | 117 |
113 // -checkForUpdate launches a check for updates, and -installUpdate begins | 118 // -checkForUpdate launches a check for updates, and -installUpdate begins |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 synchronous:(BOOL)synchronous; | 170 synchronous:(BOOL)synchronous; |
166 | 171 |
167 // Requests authorization and calls -promoteTicketWithAuthorization: in | 172 // Requests authorization and calls -promoteTicketWithAuthorization: in |
168 // asynchronous mode. | 173 // asynchronous mode. |
169 - (void)promoteTicket; | 174 - (void)promoteTicket; |
170 | 175 |
171 // Sets a new value for appPath. Used during installation to point a ticket | 176 // Sets a new value for appPath. Used during installation to point a ticket |
172 // at the installed copy. | 177 // at the installed copy. |
173 - (void)setAppPath:(NSString*)appPath; | 178 - (void)setAppPath:(NSString*)appPath; |
174 | 179 |
| 180 // Sets the total number of profiles and the number of signed in profiles. |
| 181 - (void)updateProfileCountsWithNumProfiles:(uint32_t)profiles |
| 182 numSignedInProfiles:(uint32_t)signedInProfiles; |
| 183 |
175 @end // @interface KeystoneGlue | 184 @end // @interface KeystoneGlue |
176 | 185 |
177 @interface KeystoneGlue(ExposedForTesting) | 186 @interface KeystoneGlue(ExposedForTesting) |
178 | 187 |
179 // Load any params we need for configuring Keystone. | 188 // Load any params we need for configuring Keystone. |
180 - (void)loadParameters; | 189 - (void)loadParameters; |
181 | 190 |
182 // Load the Keystone registration object. | 191 // Load the Keystone registration object. |
183 // Return NO on failure. | 192 // Return NO on failure. |
184 - (BOOL)loadKeystoneRegistration; | 193 - (BOOL)loadKeystoneRegistration; |
(...skipping 20 matching lines...) Expand all Loading... |
205 | 214 |
206 // True if Keystone is enabled. | 215 // True if Keystone is enabled. |
207 bool KeystoneEnabled(); | 216 bool KeystoneEnabled(); |
208 | 217 |
209 // The version of the application currently installed on disk. | 218 // The version of the application currently installed on disk. |
210 base::string16 CurrentlyInstalledVersion(); | 219 base::string16 CurrentlyInstalledVersion(); |
211 | 220 |
212 } // namespace keystone_glue | 221 } // namespace keystone_glue |
213 | 222 |
214 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ | 223 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ |
OLD | NEW |