Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: chrome/third_party/jstemplate/compile.py

Issue 7086003: Apply content-security-policy to chrome://plugins page. This involves (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/third_party/jstemplate/README.chromium ('k') | chrome/third_party/jstemplate/jstemplate_compiled.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/third_party/jstemplate/compile.py
===================================================================
--- chrome/third_party/jstemplate/compile.py (revision 87333)
+++ chrome/third_party/jstemplate/compile.py (working copy)
@@ -4,13 +4,14 @@
# found in the LICENSE file.
# A python script that combines the javascript files needed by jstemplate into
-# a single file.
+# a single file. Writes to standard output; you are responsible for putting
+# the file into the tree where it belongs.
import httplib
+import sys
import urllib
srcs ="util.js jsevalcontext.js jstemplate.js exports.js".split()
-out = "jstemplate_compiled.js"
# Wrap the output in an anonymous function to prevent poluting the global
# namespace.
@@ -32,7 +33,5 @@
conn = httplib.HTTPConnection('closure-compiler.appspot.com')
conn.request('POST', '/compile', params, headers)
response = conn.getresponse()
-out_file = file(out, 'w')
-out_file.write(output_wrapper % response.read())
-out_file.close()
+sys.stdout.write(output_wrapper % response.read())
conn.close()
« no previous file with comments | « chrome/third_party/jstemplate/README.chromium ('k') | chrome/third_party/jstemplate/jstemplate_compiled.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698