Index: build/mac/tweak_info_plist.py |
diff --git a/build/mac/tweak_info_plist.py b/build/mac/tweak_info_plist.py |
index eb38acea4e27ff669b6e56492632e8b3744324e6..0f65e4aed2016118fe1bb1f288a5dcbd98bfe353 100755 |
--- a/build/mac/tweak_info_plist.py |
+++ b/build/mac/tweak_info_plist.py |
@@ -204,6 +204,24 @@ def _RemoveBreakpadKeys(plist): |
'BreakpadSkipConfirm') |
+def _TagSuffixes(): |
+ # Keep this list sorted in the order that tag suffix components are to |
+ # appear in a tag value. That is to say, it should be sorted per ASCII. |
+ components = ('32bit', 'full') |
+ assert tuple(sorted(components)) == components |
+ |
+ components_len = len(components) |
+ combinations = 1 << components_len |
+ tag_suffixes = [] |
+ for combination in xrange(0, combinations): |
+ tag_suffix = '' |
+ for component_index in xrange(0, components_len): |
+ if combination & (1 << component_index): |
+ tag_suffix += '-' + components[component_index] |
+ tag_suffixes.append(tag_suffix) |
+ return tag_suffixes |
+ |
+ |
def _AddKeystoneKeys(plist, bundle_identifier): |
"""Adds the Keystone keys. This must be called AFTER _AddVersionKeys() and |
also requires the |bundle_identifier| argument (com.example.product).""" |
@@ -211,6 +229,11 @@ def _AddKeystoneKeys(plist, bundle_identifier): |
plist['KSProductID'] = bundle_identifier |
plist['KSUpdateURL'] = 'https://tools.google.com/service/update2' |
+ _RemoveKeys(plist, 'KSChannelID') |
+ for tag_suffix in _TagSuffixes(): |
+ if tag_suffix: |
+ plist['KSChannelID' + tag_suffix] = tag_suffix |
+ |
def _RemoveKeystoneKeys(plist): |
"""Removes any set Keystone keys.""" |
@@ -219,6 +242,11 @@ def _RemoveKeystoneKeys(plist): |
'KSProductID', |
'KSUpdateURL') |
+ tag_keys = [] |
+ for tag_suffix in _TagSuffixes(): |
+ tag_keys.append('KSChannelID' + tag_suffix) |
+ _RemoveKeys(plist, *tag_keys) |
+ |
def Main(argv): |
parser = optparse.OptionParser('%prog [options]') |