| Index: chrome/browser/resources/vulcanize_gn.py
|
| diff --git a/chrome/browser/resources/vulcanize_gn.py b/chrome/browser/resources/vulcanize_gn.py
|
| index 0b2df59ac2b0f6ae5b0585090ddc1fcd40f5d4a6..2cf639a10637929869bfb1b02d7765469dd9ca1a 100755
|
| --- a/chrome/browser/resources/vulcanize_gn.py
|
| +++ b/chrome/browser/resources/vulcanize_gn.py
|
| @@ -144,7 +144,8 @@ def _vulcanize(in_folder, out_folder, host, html_in_file,
|
| output = _run_node(
|
| [node_modules.PathToVulcanize()] +
|
| _VULCANIZE_BASE_ARGS + _VULCANIZE_REDIRECT_ARGS +
|
| - ['--out-request-list', os.path.join(out_path, _REQUEST_LIST_FILE),
|
| + ['--out-request-list', os.path.normpath(
|
| + os.path.join(out_path, _REQUEST_LIST_FILE)),
|
| '--redirect', '"/|%s"' % in_path,
|
| '--redirect', '"chrome://%s/|%s"' % (host, in_path),
|
| # TODO(dpapad): Figure out why vulcanize treats the input path
|
| @@ -165,6 +166,18 @@ def _vulcanize(in_folder, out_folder, host, html_in_file,
|
| '--html', html_out_path,
|
| '--js', js_out_path])
|
|
|
| + # Replace last line of vulcanized HTML to use an absolute path for
|
| + # crisper.js. TODO(dpapad): Is there a faster way to do this?
|
| + js_out_file = os.path.basename(js_out_path)
|
| + with open(html_out_path, 'r+') as f:
|
| + lines = f.readlines();
|
| + last_line = lines[-1]
|
| + updated_line = last_line.replace(
|
| + js_out_file, 'chrome://' + host + '/' + js_out_file)
|
| + lines[-1] = updated_line
|
| + f.seek(0)
|
| + f.write(''.join(lines))
|
| +
|
| # TODO(tsergeant): Remove when JS resources are minified by default:
|
| # crbug.com/619091.
|
| _run_node([node_modules.PathToUglifyJs(), js_out_path,
|
|
|