OLD | NEW |
1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 | 10 |
11 #if defined(__OBJC__) | 11 #if defined(__OBJC__) |
12 | 12 |
13 #import <Foundation/Foundation.h> | 13 #import <Foundation/Foundation.h> |
14 | 14 |
| 15 #include "base/mac/scoped_authorizationref.h" |
15 #import "base/memory/scoped_nsobject.h" | 16 #import "base/memory/scoped_nsobject.h" |
16 #include "chrome/browser/mac/scoped_authorizationref.h" | |
17 | 17 |
18 // Possible outcomes of various operations. A version may accompany some of | 18 // Possible outcomes of various operations. A version may accompany some of |
19 // these, but beware: a version is never required. For statuses that can be | 19 // these, but beware: a version is never required. For statuses that can be |
20 // accompanied by a version, the comment indicates what version is referenced. | 20 // accompanied by a version, the comment indicates what version is referenced. |
21 // A notification posted containing an asynchronous status will always be | 21 // A notification posted containing an asynchronous status will always be |
22 // followed by a notification with a terminal status. | 22 // followed by a notification with a terminal status. |
23 enum AutoupdateStatus { | 23 enum AutoupdateStatus { |
24 kAutoupdateNone = 0, // no version (initial state only) | 24 kAutoupdateNone = 0, // no version (initial state only) |
25 kAutoupdateRegistering, // no version (asynchronous operation in progress) | 25 kAutoupdateRegistering, // no version (asynchronous operation in progress) |
26 kAutoupdateRegistered, // no version | 26 kAutoupdateRegistered, // no version |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 // And the Keystone registration itself, with the active timer | 88 // And the Keystone registration itself, with the active timer |
89 KSRegistration* registration_; // strong | 89 KSRegistration* registration_; // strong |
90 NSTimer* timer_; // strong | 90 NSTimer* timer_; // strong |
91 | 91 |
92 // The most recent kAutoupdateStatusNotification notification posted. | 92 // The most recent kAutoupdateStatusNotification notification posted. |
93 scoped_nsobject<NSNotification> recentNotification_; | 93 scoped_nsobject<NSNotification> recentNotification_; |
94 | 94 |
95 // 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 |
96 // carried across threads. | 96 // carried across threads. |
97 ScopedAuthorizationRef authorization_; | 97 base::mac::ScopedAuthorizationRef authorization_; |
98 | 98 |
99 // YES if a synchronous promotion operation is in progress (promotion during | 99 // YES if a synchronous promotion operation is in progress (promotion during |
100 // installation). | 100 // installation). |
101 BOOL synchronousPromotion_; | 101 BOOL synchronousPromotion_; |
102 | 102 |
103 // YES if an update was ever successfully installed by -installUpdate. | 103 // YES if an update was ever successfully installed by -installUpdate. |
104 BOOL updateSuccessfullyInstalled_; | 104 BOOL updateSuccessfullyInstalled_; |
105 } | 105 } |
106 | 106 |
107 // Return the default Keystone Glue object. | 107 // Return the default Keystone Glue object. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 // True if Keystone is enabled. | 207 // True if Keystone is enabled. |
208 bool KeystoneEnabled(); | 208 bool KeystoneEnabled(); |
209 | 209 |
210 // The version of the application currently installed on disk. | 210 // The version of the application currently installed on disk. |
211 string16 CurrentlyInstalledVersion(); | 211 string16 CurrentlyInstalledVersion(); |
212 | 212 |
213 } // namespace keystone_glue | 213 } // namespace keystone_glue |
214 | 214 |
215 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ | 215 #endif // CHROME_BROWSER_MAC_KEYSTONE_GLUE_H_ |
OLD | NEW |