Index: chrome/tools/build/mac/tweak_info_plist |
diff --git a/chrome/tools/build/mac/tweak_info_plist b/chrome/tools/build/mac/tweak_info_plist |
index b65abc674ff60618ebd18a4f070dd032deee176e..aed9cf78fbba49c5b88791ab4fcf78df3bb732c4 100755 |
--- a/chrome/tools/build/mac/tweak_info_plist |
+++ b/chrome/tools/build/mac/tweak_info_plist |
@@ -174,7 +174,6 @@ def _DoPDFKeys(plist, add_keys): |
def _AddBreakpadKeys(plist, branding): |
"""Adds the Breakpad keys. This must be called AFTER _AddVersionKeys() and |
also requires the |branding| argument.""" |
- plist['BreakpadURL'] = 'https://clients2.google.com/cr/report' |
plist['BreakpadReportInterval'] = '3600' # Deliberately a string. |
plist['BreakpadProduct'] = '%s_Mac' % branding |
plist['BreakpadProductDisplay'] = branding |
@@ -214,8 +213,11 @@ def _RemoveKeystoneKeys(plist): |
def Main(argv): |
parser = optparse.OptionParser('%prog [options] branding bundle-id') |
- parser.add_option('-b', dest='use_breakpad', action='store', type='int', |
- default=False, help='Enable Breakpad [1 or 0]') |
+ parser.add_option('--breakpad', dest='use_breakpad', action='store', |
+ type='int', default=False, help='Enable Breakpad [1 or 0]') |
+ parser.add_option('--breakpad_uploads', dest='breakpad_uploads', |
+ action='store', type='int', default=False, |
+ help='Enable Breakpad\'s uploading of crash dumps [1 or 0]') |
parser.add_option('-k', dest='use_keystone', action='store', type='int', |
default=False, help='Enable Keystone [1 or 0]') |
parser.add_option('-s', dest='add_svn_info', action='store', type='int', |
@@ -243,6 +245,16 @@ def Main(argv): |
# Add Breakpad if configured to do so. |
if options.use_breakpad: |
_AddBreakpadKeys(plist, branding) |
+ if options.breakpad_uploads: |
+ plist['BreakpadURL'] = 'https://clients2.google.com/cr/report' |
+ else: |
+ # This allows crash dumping to a file without uploading the |
+ # dump, for testing purposes. Breakpad does not recognise |
+ # "none" as a special value, but this does stop crash dump |
+ # uploading from happening. We need to specify something |
+ # because if "BreakpadURL" is not present, Breakpad will not |
+ # register its crash handler and no crash dumping will occur. |
+ plist['BreakpadURL'] = 'none' |
else: |
_RemoveBreakpadKeys(plist) |