summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorestade <estade@chromium.org>2015-04-20 15:04:18 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-20 22:05:24 +0000
commitef2d6eb985b01fe0df168aa6c4cc8d8d8eac73b2 (patch)
treecb3d93674fbc2d703fa53cd02b62c414f88d0b3c /build
parent9810b839ceee86853472f24fa7a2da677a6bf4b3 (diff)
downloadchromium_src-ef2d6eb985b01fe0df168aa6c4cc8d8d8eac73b2.zip
chromium_src-ef2d6eb985b01fe0df168aa6c4cc8d8d8eac73b2.tar.gz
chromium_src-ef2d6eb985b01fe0df168aa6c4cc8d8d8eac73b2.tar.bz2
Remove build step that escapes unicode in autofill_regex_constants.cc
Just put the unicode directly into the .cc file. I'm not sure when this became possible, but we have tests that put unicode directly in string literals without escaping. BUG=478334 Review URL: https://codereview.chromium.org/1090373002 Cr-Commit-Position: refs/heads/master@{#325918}
Diffstat (limited to 'build')
-rwxr-xr-xbuild/escape_unicode.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/build/escape_unicode.py b/build/escape_unicode.py
deleted file mode 100755
index 859ba5d..0000000
--- a/build/escape_unicode.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Convert any unicode characters found in the input file to C literals."""
-
-import codecs
-import optparse
-import os
-import sys
-
-
-def main(argv):
- parser = optparse.OptionParser()
- usage = 'Usage: %prog -o <output_dir> <input_file>'
- parser.set_usage(usage)
- parser.add_option('-o', dest='output_dir')
-
- options, arglist = parser.parse_args(argv)
-
- if not options.output_dir:
- print "output_dir required"
- return 1
-
- if len(arglist) != 2:
- print "input_file required"
- return 1
-
- in_filename = arglist[1]
-
- if not in_filename.endswith('.utf8'):
- print "input_file should end in .utf8"
- return 1
-
- out_filename = os.path.join(options.output_dir, os.path.basename(
- os.path.splitext(in_filename)[0]))
-
- WriteEscapedFile(in_filename, out_filename)
- return 0
-
-
-def WriteEscapedFile(in_filename, out_filename):
- input_data = codecs.open(in_filename, 'r', 'utf8').read()
- with codecs.open(out_filename, 'w', 'ascii') as out_file:
- for i, char in enumerate(input_data):
- if ord(char) > 127:
- out_file.write(repr(char.encode('utf8'))[1:-1])
- if input_data[i + 1:i + 2] in '0123456789abcdefABCDEF':
- out_file.write('""')
- else:
- out_file.write(char.encode('ascii'))
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))