Skip to content

Commit

Permalink
Fix ui_unittests building with enable_autofill_dialog=0
Browse files Browse the repository at this point in the history
Review URL: https://codereview.chromium.org/178193032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270107 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jiangj@opera.com committed May 13, 2014
1 parent 7549198 commit 24ee6a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions chrome/chrome_repack_locales.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
'inputs': [
'<(repack_locales_path)',
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) --use-ash <(use_ash) <(pak_locales))'
'<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) --use-ash <(use_ash) --enable-autofill-dialog <(enable_autofill_dialog) <(pak_locales))'
],
'outputs': [
'<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pak_locales))'
Expand All @@ -31,7 +31,8 @@
'-g', '<(grit_out_dir)',
'-s', '<(SHARED_INTERMEDIATE_DIR)',
'-x', '<(SHARED_INTERMEDIATE_DIR)/.',
'--use-ash', '<(use_ash)',
'--use-ash=<(use_ash)',
'--enable-autofill-dialog=<(enable_autofill_dialog)',
'<@(repack_options)',
'<@(pak_locales)',
],
Expand Down
8 changes: 7 additions & 1 deletion chrome/tools/build/repack_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
OS = None

USE_ASH = False
ENABLE_AUTOFILL_DIALOG = False

WHITELIST = None

Expand Down Expand Up @@ -108,7 +109,7 @@ def calc_inputs(locale):
inputs.append(os.path.join(SHARE_INT_DIR, 'extensions', 'strings',
'extensions_strings_%s.pak' % locale))

if OS != 'ios' and OS != 'android':
if ENABLE_AUTOFILL_DIALOG and OS != 'ios' and OS != 'android':
#e.g. '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
# libaddressinput_strings_da.pak',
inputs.append(os.path.join(SHARE_INT_DIR, 'third_party', 'libaddressinput',
Expand Down Expand Up @@ -172,6 +173,7 @@ def DoMain(argv):
global OS
global USE_ASH
global WHITELIST
global ENABLE_AUTOFILL_DIALOG
global EXTRA_INPUT_FILES

parser = optparse.OptionParser("usage: %prog [options] locales")
Expand All @@ -196,6 +198,9 @@ def DoMain(argv):
help="Whether to include ash strings")
parser.add_option("--whitelist", action="store", help="Full path to the "
"whitelist used to filter output pak file resource IDs")
parser.add_option("--enable-autofill-dialog", action="store",
dest="enable_autofill_dialog",
help="Whether to include strings for autofill dialog")
options, locales = parser.parse_args(argv)

if not locales:
Expand All @@ -211,6 +216,7 @@ def DoMain(argv):
OS = options.os
USE_ASH = options.use_ash == '1'
WHITELIST = options.whitelist
ENABLE_AUTOFILL_DIALOG = options.enable_autofill_dialog == '1'

if not OS:
if sys.platform == 'darwin':
Expand Down

0 comments on commit 24ee6a4

Please sign in to comment.