Index: chrome/browser/cocoa/keystone_glue.mm |
=================================================================== |
--- chrome/browser/cocoa/keystone_glue.mm (revision 86136) |
+++ chrome/browser/cocoa/keystone_glue.mm (working copy) |
@@ -49,6 +49,8 @@ |
NSString* const KSRegistrationTagKeyKey = @"TagKey"; |
NSString* const KSRegistrationBrandPathKey = @"BrandPath"; |
NSString* const KSRegistrationBrandKeyKey = @"BrandKey"; |
+NSString* const KSRegistrationVersionPathKey = @"VersionPath"; |
+NSString* const KSRegistrationVersionKeyKey = @"VersionKey"; |
NSString* const KSRegistrationDidCompleteNotification = |
@"KSRegistrationDidCompleteNotification"; |
@@ -69,8 +71,8 @@ |
NSString* const KSRegistrationRemoveExistingTag = @""; |
#define KSRegistrationPreserveExistingTag nil |
-// Constants for the brand file (uses an external file so it can survive updates |
-// to Chrome. |
+// Constants for the brand file (uses an external file so it can survive |
+// updates to Chrome.) |
#if defined(GOOGLE_CHROME_BUILD) |
#define kBrandFileName @"Google Chrome Brand.plist"; |
@@ -155,7 +157,7 @@ |
@end // @interface KSRegistration |
-@interface KeystoneGlue(Private) |
+@interface KeystoneGlue (Private) |
// Returns the path to the application's Info.plist file. This returns the |
// outer application bundle's Info.plist, not the framework's Info.plist. |
@@ -228,7 +230,7 @@ |
// Returns the brand file path to use for Keystone. |
- (NSString*)brandFilePath; |
-@end // @interface KeystoneGlue(Private) |
+@end // @interface KeystoneGlue (Private) |
NSString* const kAutoupdateStatusNotification = @"AutoupdateStatusNotification"; |
NSString* const kAutoupdateStatusStatus = @"status"; |
@@ -238,6 +240,7 @@ |
NSString* const kChannelKey = @"KSChannelID"; |
NSString* const kBrandKey = @"KSBrandID"; |
+NSString* const kVersionKey = @"KSVersion"; |
} // namespace |
@@ -320,7 +323,7 @@ |
NSString* appPath = [appBundle bundlePath]; |
NSString* url = [infoDictionary objectForKey:@"KSUpdateURL"]; |
- NSString* version = [infoDictionary objectForKey:@"KSVersion"]; |
+ NSString* version = [infoDictionary objectForKey:kVersionKey]; |
if (!productID || !appPath || !url || !version) { |
// If parameters required for Keystone are missing, don't use it. |
@@ -482,8 +485,7 @@ |
- (NSDictionary*)keystoneParameters { |
NSNumber* xcType = [NSNumber numberWithInt:kKSPathExistenceChecker]; |
NSNumber* preserveTTToken = [NSNumber numberWithBool:YES]; |
- NSString* tagPath = [self appInfoPlistPath]; |
- |
+ NSString* appInfoPlistPath = [self appInfoPlistPath]; |
NSString* brandKey = kBrandKey; |
NSString* brandPath = [self brandFilePath]; |
@@ -495,12 +497,14 @@ |
return [NSDictionary dictionaryWithObjectsAndKeys: |
version_, KSRegistrationVersionKey, |
+ appInfoPlistPath, KSRegistrationVersionPathKey, |
+ kVersionKey, KSRegistrationVersionKeyKey, |
xcType, KSRegistrationExistenceCheckerTypeKey, |
appPath_, KSRegistrationExistenceCheckerStringKey, |
url_, KSRegistrationServerURLStringKey, |
preserveTTToken, KSRegistrationPreserveTrustedTesterTokenKey, |
channel_, KSRegistrationTagKey, |
- tagPath, KSRegistrationTagPathKey, |
+ appInfoPlistPath, KSRegistrationTagPathKey, |
kChannelKey, KSRegistrationTagKeyKey, |
brandPath, KSRegistrationBrandPathKey, |
brandKey, KSRegistrationBrandKeyKey, |
@@ -827,7 +831,7 @@ |
// if the synchronous parameter is NO. |
NSString* preflightPath = |
[base::mac::MainAppBundle() pathForResource:@"keystone_promote_preflight" |
- ofType:@"sh"]; |
+ ofType:@"sh"]; |
const char* preflightPathC = [preflightPath fileSystemRepresentation]; |
const char* userBrandFile = NULL; |
const char* systemBrandFile = NULL; |
@@ -913,7 +917,7 @@ |
SEL selector = @selector(changePermissionsForPromotionWithTool:); |
NSString* toolPath = |
[base::mac::MainAppBundle() pathForResource:@"keystone_promote_postflight" |
- ofType:@"sh"]; |
+ ofType:@"sh"]; |
PerformBridge::PostPerform(self, selector, toolPath); |
} |